ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

clock.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 doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.