mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
12 lines
420 B
Go
12 lines
420 B
Go
|
|
// Copyright 2016 The Go Authors. All rights reserved.
|
||
|
|
// Use of this source code is governed by a BSD-style
|
||
|
|
// license that can be found in the LICENSE file.
|
||
|
|
|
||
|
|
// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
|
||
|
|
|
||
|
|
package syscall
|
||
|
|
|
||
|
|
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||
|
|
|
||
|
|
func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
|