main
test-branch
|
Last change
on this file since 1aaefd4 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago |
|
Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
290 bytes
|
| Line | |
|---|
| 1 | #include "wtime.h"
|
|---|
| 2 | #include <time.h>
|
|---|
| 3 | #ifndef DOS
|
|---|
| 4 | #include <sys/time.h>
|
|---|
| 5 | #endif
|
|---|
| 6 |
|
|---|
| 7 | void wtime(double *t)
|
|---|
| 8 | {
|
|---|
| 9 | /* a generic timer */
|
|---|
| 10 | static int sec = -1;
|
|---|
| 11 | struct timeval tv;
|
|---|
| 12 | gettimeofday(&tv, (void *)0);
|
|---|
| 13 | if (sec < 0) sec = tv.tv_sec;
|
|---|
| 14 | *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec;
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.