Revision 12203,
995 bytes
checked in by ghudson, 26 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r12202,
which included commits to RCS files with non-trunk default branches.
|
Line | |
---|
1 | /* |
---|
2 | * UNIX-style Time Functions, by pmoreau@cena.dgac.fr <Patrick MOREAU> |
---|
3 | * (picked up from XVMSUTILS unix emulation routines for VMS by |
---|
4 | * Trevor Taylor, Patrick Mahans and Martin P.J. Zinser) |
---|
5 | * |
---|
6 | * Permission to use, copy, modify, distribute, and sell this software and its |
---|
7 | * documentation for any purpose is hereby granted without fee, provided that |
---|
8 | * the above copyright notice appear in all copies and that both that |
---|
9 | * copyright notice and this permission notice appear in supporting |
---|
10 | * documentation. No representations are made about the suitability of this |
---|
11 | * software for any purpose. It is provided "as is" without express or |
---|
12 | * implied warranty. |
---|
13 | */ |
---|
14 | #include <stdio.h> |
---|
15 | #include <signal.h> |
---|
16 | #include <time.h> |
---|
17 | #include "vms-gtod.h" |
---|
18 | |
---|
19 | /* |
---|
20 | * gettimeofday(2) - Returns the current time |
---|
21 | */ |
---|
22 | |
---|
23 | int gettimeofday(tv) |
---|
24 | struct timeval *tv; |
---|
25 | { |
---|
26 | timeb_t tmp_time; |
---|
27 | ftime(&tmp_time); |
---|
28 | tv->tv_sec = tmp_time.time; |
---|
29 | tv->tv_usec = tmp_time.millitm * 1000; |
---|
30 | return (0); |
---|
31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.