aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorDavid <david@xagasoft.com>2007-06-19 06:05:55 +0000
committerDavid <david@xagasoft.com>2007-06-19 06:05:55 +0000
commit2b0fa89df615cb4789668014475ae64d99e773b5 (patch)
tree818d58faaf0e91530888284d75e6700d9097b1c7 /src/tests
parent8a7fed8386c152023ddae611fe274b966287370a (diff)
downloadlibbu++-2b0fa89df615cb4789668014475ae64d99e773b5.tar.gz
libbu++-2b0fa89df615cb4789668014475ae64d99e773b5.tar.bz2
libbu++-2b0fa89df615cb4789668014475ae64d99e773b5.tar.xz
libbu++-2b0fa89df615cb4789668014475ae64d99e773b5.zip
david - got some things compiling on win32 (wine/devc++)
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/fstring.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tests/fstring.cpp b/src/tests/fstring.cpp
index d600be6..48dfc5f 100644
--- a/src/tests/fstring.cpp
+++ b/src/tests/fstring.cpp
@@ -3,12 +3,22 @@
3#include <sys/time.h> 3#include <sys/time.h>
4#include <string> 4#include <string>
5 5
6#ifndef WIN32
6inline double getTime() 7inline double getTime()
7{ 8{
8 struct timeval tv; 9 struct timeval tv;
9 gettimeofday( &tv, NULL ); 10 gettimeofday( &tv, NULL );
10 return ((double)tv.tv_sec) + ((double)tv.tv_usec/1000000.0); 11 return ((double)tv.tv_sec) + ((double)tv.tv_usec/1000000.0);
11} 12}
13#else
14#include "windows.h"
15#include "winbase.h"
16inline double getTime()
17{
18 uint32_t t = (uint32_t) GetTickCount();
19 return (double) t / 1000.0;
20}
21#endif
12 22
13Bu::FString genThing() 23Bu::FString genThing()
14{ 24{