github.com/embeddedgo/x@v0.0.6-0.20191217015414-d79a36f562e7/time/time_noos.go (about) 1 // Copyright 2019 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 package time 6 7 import _ "unsafe" 8 9 // Set sets the current time. 10 func Set(t Time) { 11 runtime_setwalltime(t.sec()+internalToUnix, t.nsec()) 12 } 13 14 //go:linkname runtime_setwalltime runtime.setwalltime 15 func runtime_setwalltime(sec int64, nsec int32)