Logo Search packages:      
Sourcecode: pwlib version File versions

PTime::PTime (  ) 

Create a time object instance. This initialises the time with the current time in the current time zone.

Definition at line 595 of file win32.cxx.

References theTime.

Referenced by Clone(), operator+(), and operator-().

  // Magic constant to convert epoch from 1601 to 1970
  static const PInt64 delta = ((PInt64)369*365+(369/4)-3)*24*60*60U;
  static const PInt64 scale = 10000000;

  PInt64 timestamp;

#ifndef _WIN32_WCE
  SYSTEMTIME SystemTime;
  SystemTimeToFileTime(&SystemTime, (LPFILETIME)&timestamp);

  theTime = (time_t)(timestamp/scale - delta);
  microseconds = (long)(timestamp%scale/10);

Generated by  Doxygen 1.6.0   Back to index