fieker-DuValspielwiese
Last change
on this file since 54e84ca was
09da99,
checked in by Hans Schönemann <hannes@…>, 21 years ago
|
*hannes: NTL- 5.3.1
git-svn-id: file:///usr/local/Singular/svn/trunk@6910 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
491 bytes
|
Line | |
---|
1 | #include <NTL/config.h> |
---|
2 | |
---|
3 | #if (defined(NTL_CXX_ONLY) && !defined(__cplusplus)) |
---|
4 | #error "CXX_ONLY flag set...must use C++ compiler" |
---|
5 | #endif |
---|
6 | |
---|
7 | #include <sys/time.h> |
---|
8 | #include <sys/resource.h> |
---|
9 | |
---|
10 | |
---|
11 | #if (defined(__cplusplus) && !defined(NTL_CXX_ONLY)) |
---|
12 | extern "C" double _ntl_GetTime(); |
---|
13 | #endif |
---|
14 | |
---|
15 | |
---|
16 | double _ntl_GetTime(void) |
---|
17 | { |
---|
18 | struct rusage used; |
---|
19 | |
---|
20 | getrusage(RUSAGE_SELF, &used); |
---|
21 | return (used.ru_utime.tv_sec + used.ru_stime.tv_sec + |
---|
22 | (used.ru_utime.tv_usec + used.ru_stime.tv_usec) / 1e6); |
---|
23 | } |
---|
24 | |
---|
Note: See
TracBrowser
for help on using the repository browser.