source: CIVL/mods/dev.civl.com/examples/omp/nas-dc/common/wtime.c@ cb4d4f4

main test-branch
Last change on this file since cb4d4f4 was aad342c, checked in by Stephen Siegel <siegel@…>, 3 years ago

Performing huge refactor to incorporate ABC, GMC, and SARL into CIVL repo and use Java modules.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5664 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
7void 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.