Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: mojo/go/system/impl/core_impl.go

Issue 556813003: Add Go build support for GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: got full gn build working Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 {
qsr 2014/09/22 11:11:25 Do you have typedef or equivalent in go? I underst
tburkard 2014/09/22 14:23:17 I will address this in a follow-on change, which I
14 return (int64)(C.MojoGetTimeTicksNow());
15 }
16
17 var lazyInstance *CoreImpl = nil;
18
19 func GetCore() system.Core {
20 if lazyInstance == nil {
qsr 2014/09/22 11:11:25 Do you need any kind of thread safety here?
tburkard 2014/09/22 14:23:17 I will address this in a follow-on change, which I
21 lazyInstance = new(CoreImpl);
22 }
23 return lazyInstance;
24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698