File: linux_arm.go

package info (click to toggle)
golang-github-anacrolix-fuse 0.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,000 kB
  • sloc: makefile: 5; sh: 3
file content (20 lines) | stat: -rw-r--r-- 421 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2017 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.

//go:build linux && arm
// +build linux,arm

package main

import (
	"syscall"
	"time"
)

func tToTv(t time.Time) (tv syscall.Timeval) {
	tv.Sec = int32(t.Unix())
	tv.Usec = int32(t.UnixNano() % time.Second.Nanoseconds() /
		time.Microsecond.Nanoseconds())
	return tv
}