1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
11 // Return current time. This is the implementation of time.now().
19 struct time_now_ret
now()
20 __asm__ (GOSYM_PREFIX
"time.now")
21 __attribute__ ((no_split_stack
));
27 struct time_now_ret ret
;
29 gettimeofday (&tv
, NULL
);
31 ret
.nsec
= tv
.tv_usec
* 1000;