Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenclock.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: LGPL, See LGPL.txt in the top level directory 00003 * PROJECT: ReactOS CRT library 00004 * FILE: lib/sdk/crt/time/clock.c 00005 * PURPOSE: Implementation of clock() 00006 * PROGRAMER: Timo Kreuzer 00007 */ 00008 #include <precomp.h> 00009 00010 ULARGE_INTEGER g_StartupTime; 00011 00012 void 00013 initclock(void) 00014 { 00015 GetSystemTimeAsFileTime((FILETIME*)&g_StartupTime); 00016 } 00017 00018 /****************************************************************************** 00019 * \name clock 00020 * \brief Returns the current process's elapsed time. 00021 */ 00022 clock_t 00023 clock(void) 00024 { 00025 ULARGE_INTEGER Time; 00026 00027 GetSystemTimeAsFileTime((FILETIME*)&Time); 00028 Time.QuadPart -= g_StartupTime.QuadPart; 00029 return (clock_t)FileTimeToUnixTime((FILETIME*)&Time, NULL); 00030 }; Generated on Sat May 26 2012 04:19:47 for ReactOS by
1.7.6.1
|