mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
- replaced gofmt expression formatting algorithm with
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
This commit is contained in:
parent
baba292998
commit
3bb0032cd6
121 changed files with 750 additions and 750 deletions
|
|
@ -11,8 +11,8 @@ func Getpagesize() int { return 4096 }
|
|||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int32(nsec/1e9);
|
||||
ts.Nsec = int32(nsec%1e9);
|
||||
ts.Sec = int32(nsec / 1e9);
|
||||
ts.Nsec = int32(nsec % 1e9);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -20,8 +20,8 @@ func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)
|
|||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999; // round up to microsecond
|
||||
tv.Sec = int32(nsec/1e9);
|
||||
tv.Usec = int32(nsec%1e9/1e3);
|
||||
tv.Sec = int32(nsec / 1e9);
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue