diff options
Diffstat (limited to 'sal/osl/w32/time.c')
-rw-r--r-- | sal/osl/w32/time.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sal/osl/w32/time.c b/sal/osl/w32/time.c index 49f33c297c43..fc8855b53680 100644 --- a/sal/osl/w32/time.c +++ b/sal/osl/w32/time.c @@ -184,21 +184,17 @@ sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( TimeValue* pLocalTimeVal, Time return sal_False; } - static struct _timeb startTime; -static sal_Bool bGlobalTimer = sal_False; +void sal_initGlobalTimer() +{ + _ftime( &startTime ); +} sal_uInt32 SAL_CALL osl_getGlobalTimer(void) { struct _timeb currentTime; sal_uInt32 nSeconds; - if ( bGlobalTimer == sal_False ) - { - _ftime( &startTime ); - bGlobalTimer=sal_True; - } - _ftime( ¤tTime ); nSeconds = (sal_uInt32)( currentTime.time - startTime.time ); |