Added clock_seconds implementation to win32 port

This commit is contained in:
adamdunkels 2008-07-10 17:08:54 +00:00
parent ec0de7b82e
commit a8f2e8ca48

View File

@ -30,7 +30,7 @@
* *
* Author: Oliver Schmidt <ol.sc@web.de> * Author: Oliver Schmidt <ol.sc@web.de>
* *
* $Id: clock.c,v 1.1 2007/04/14 23:23:15 oliverschmidt Exp $ * $Id: clock.c,v 1.2 2008/07/10 17:08:54 adamdunkels Exp $
*/ */
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
@ -48,3 +48,12 @@ clock_time(void)
return (clock_time_t)(time / 10000); return (clock_time_t)(time / 10000);
} }
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
unsigned long
clock_seconds(void)
{
unsigned long long time;
GetSystemTimeAsFileTime((PFILETIME)&time);
return (clock_time_t)(time / 10);
}
/*-----------------------------------------------------------------------------------*/