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.
13 // When faketime is enabled, we redirect writes to FDs 1 and 2 through
14 // the runtime's write function, since that adds the framing that
15 // reports the emulated time.
17 //go:linkname runtimeWrite runtime.write
18 func runtimeWrite(fd
uintptr, p unsafe
.Pointer
, n
int32) int32
20 func faketimeWrite(fd
int, p
[]byte) int {
25 return int(runtimeWrite(uintptr(fd
), unsafe
.Pointer(pp
), int32(len(p
))))