Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 package impl; | |
| 2 | |
| 3 /* | |
| 4 #include "mojo/public/platform/native/system_thunks.h" | |
| 5 */ | |
| 6 import "C" | |
| 7 import "mojo/public/go/mojo/system" | |
| 8 | |
| 9 | |
| 10 type CoreImpl struct { | |
| 11 } | |
| 12 | |
| 13 func (c CoreImpl) GetTimeTicksNow() int64 { | |
| 14 return (int64)(C.MojoGetTimeTicksNow()); | |
| 15 } | |
| 16 | |
| 17 var lazyInstance *CoreImpl = nil; | |
| 18 | |
| 19 func GetCore() system.Core { | |
| 20 if lazyInstance == nil { | |
| 21 lazyInstance = new(CoreImpl); | |
| 22 } | |
| 23 return lazyInstance; | |
| 24 } | |
| OLD | NEW |