blob: 39112ebcc3701914cb3020409728c80e22ea9877 [file] [log] [blame]
Brad Fitzpatrick51947442016-03-01 22:57:46 +00001// Copyright 2013 The Go Authors. All rights reserved.
Dave Cheney7c8280c2014-02-25 09:47:42 -05002// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package syscall
6
7type Timespec struct {
8 Sec int64
9 Nsec int32
10}
11
12type Timeval struct {
13 Sec int64
14 Usec int32
15}
16
Ian Lance Taylor6c517df2016-10-11 21:04:16 -070017func setTimespec(sec, nsec int64) Timespec {
18 return Timespec{Sec: sec, Nsec: int32(nsec)}
Dave Cheney7c8280c2014-02-25 09:47:42 -050019}
20
Ian Lance Taylor6c517df2016-10-11 21:04:16 -070021func setTimeval(sec, usec int64) Timeval {
22 return Timeval{Sec: sec, Usec: int32(usec)}
Dave Cheney7c8280c2014-02-25 09:47:42 -050023}