Files
pcas/src/libCom/osiTimeOSD.cc
1996-07-09 23:01:31 +00:00

27 lines
431 B
C++

#include <osiTime.h>
#include <sys/types.h>
#include <sys/time.h>
#ifdef SUNOS4
extern "C" {
int gettimeofday (struct timeval *tp, struct timezone *tzp);
}
#endif
//
// osiTime::getCurrent ()
//
osiTime osiTime::getCurrent ()
{
int status;
struct timeval tv;
status = gettimeofday (&tv, NULL);
assert (status==0);
return osiTime(tv.tv_sec, tv.tv_usec * nSecPerUSec);
}