Revert "DRAFT lib/m2: SYS_gettimeofday expects pointers."
This reverts commit 3d1dcc3971
.
This commit is contained in:
parent
932ea587df
commit
e465eb8eb9
|
@ -1,7 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
* Copyright © 2023 Meghan Denny <hello@nektro.net>
|
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -29,10 +28,10 @@ time (long* result)
|
||||||
int r;
|
int r;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
struct timezone tz;
|
struct timezone tz;
|
||||||
r = _sys_call2 (SYS_gettimeofday, &tv, &tz);
|
r = _sys_call2 (SYS_gettimeofday, tv, tz);
|
||||||
if (r != 0)
|
if (r != 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (result != 0)
|
if (result != 0)
|
||||||
result[0] = tv.tv_sec;
|
result[0] = tv->tv_sec;
|
||||||
return tv.tv_sec;
|
return tv->tv_sec;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue