blob: 459bf8e5435b063b9ba7ebe0485b44720f109866 [file] [log] [blame]
Russ Coxe4371fb2017-02-03 19:26:13 -05001// Copyright 2017 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.
4
5// Declarations for operating systems implementing time.now
6// indirectly, in terms of walltime and nanotime assembly.
7
Russ Coxe4371fb2017-02-03 19:26:13 -05008// +build !windows
9
10package runtime
11
12import _ "unsafe" // for go:linkname
13
Russ Coxe4371fb2017-02-03 19:26:13 -050014//go:linkname time_now time.now
15func time_now() (sec int64, nsec int32, mono int64) {
16 sec, nsec = walltime()
Dmitry Vyukova1ee0a22018-10-31 17:27:16 +010017 return sec, nsec, nanotime()
Russ Coxe4371fb2017-02-03 19:26:13 -050018}