~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to hrtimer.cpp

  • Committer: weidai
  • Date: 2002-10-04 21:45:04 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:6
compatibility fixes for MacOS X

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
#if defined(CRYPTOPP_WIN32_AVAILABLE)
10
10
#include <windows.h>
11
 
#elif defined(__unix__)
 
11
#elif defined(CRYPTOPP_UNIX_AVAILABLE)
12
12
#include <sys/time.h>
13
13
#elif defined(macintosh)
14
14
#include <Timer.h>
24
24
        FILETIME now;
25
25
        GetSystemTimeAsFileTime(&now);
26
26
        return now.dwLowDateTime + ((word64)now.dwHighDateTime << 32);
27
 
#elif defined(__unix__)
 
27
#elif defined(CRYPTOPP_UNIX_AVAILABLE)
28
28
        timeval now;
29
29
        gettimeofday(&now, NULL);
30
30
        return (word64)now.tv_sec * 1000000 + now.tv_usec;