Descriptionruntime: make MemStats.LastGC Unix time again
The monotonic clock patch changed all runtime times
to abstract monotonic time. As the result user-visible
MemStats.LastGC become monotonic time as well.
Restore Unix time for LastGC.
This is the simplest way to expose time.now to runtime that I found.
Another option would be to change time.now to C called
int64 runtime.unixnanotime() and then express time.now in terms of it.
But this would require to introduce 2 64-bit divisions into time.now.
Another option would be to change time.now to C called
void runtime.unixnanotime1(struct {int64 sec, int32 nsec} *now)
and then express both time.now and runtime.unixnanotime in terms of it.
Fixes issue 7852.
Patch Set 1 #Patch Set 2 : diff -r f613443bb13a https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 3 : diff -r f613443bb13a https://dvyukov%40google.com@code.google.com/p/go/ #
Total comments: 2
Patch Set 4 : diff -r 9eacb9c0d810 https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 5 : diff -r 15e9d3c5d705 https://dvyukov%40google.com@code.google.com/p/go/ #
MessagesTotal messages: 8
|