|
|
1.1 ! root 1: /* ! 2: Copyright (c) 2008 TrueCrypt Foundation. All rights reserved. ! 3: ! 4: Governed by the TrueCrypt License 2.4 the full text of which is contained ! 5: in the file License.txt included in TrueCrypt binary and source code ! 6: distribution packages. ! 7: */ ! 8: ! 9: #include "Platform/Time.h" ! 10: #include <sys/time.h> ! 11: #include <time.h> ! 12: ! 13: namespace TrueCrypt ! 14: { ! 15: uint64 Time::GetCurrent () ! 16: { ! 17: struct timeval tv; ! 18: gettimeofday (&tv, NULL); ! 19: ! 20: // Unix time => Windows file time ! 21: return ((uint64) tv.tv_sec + 134774LL * 24 * 3600) * 1000LL * 1000 * 10; ! 22: } ! 23: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.