spielwiese
Last change
on this file since 6ce030f was
2617dd5,
checked in by Kai Krüger <krueger@…>, 14 years ago
|
Added examples for cppunit tests. call make test to build and run them.
git-svn-id: file:///usr/local/Singular/svn/trunk@12434 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
526 bytes
|
Line | |
---|
1 | #ifndef _utils_hpp_ |
---|
2 | #define _utils_hpp_ |
---|
3 | |
---|
4 | #include <time.h> |
---|
5 | |
---|
6 | #ifdef _WIN32 |
---|
7 | #include <windows.h> |
---|
8 | #if !defined(_WINSOCK2API_) && !defined(_WINSOCKAPI_) |
---|
9 | struct timeval |
---|
10 | { |
---|
11 | long tv_sec; |
---|
12 | long tv_usec; |
---|
13 | }; |
---|
14 | #endif |
---|
15 | |
---|
16 | int gettimeofday(struct timeval* tp, void* tzp) |
---|
17 | { |
---|
18 | DWORD t; |
---|
19 | t = timeGetTime(); |
---|
20 | tp->tv_sec = t / 1000; |
---|
21 | tp->tv_usec = t % 1000; |
---|
22 | return 0; |
---|
23 | } |
---|
24 | #else |
---|
25 | #include <sys/time.h> |
---|
26 | #endif |
---|
27 | |
---|
28 | extern double Time (); |
---|
29 | |
---|
30 | |
---|
31 | #endif /* _utils_hpp_ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.