RCTPerformanceNow -> nativePerformanceNow
Summary: public Rename `RCTPerformanceNow` to `nativePerformanceNow` to be consistent with Android and the pattern we've been following where the native functions exposed to JSC are prefixed with `native`. Also change it to return fractional milliseconds, as the web (`performance.now`) does: https://developer.mozilla.org/en-US/docs/Web/API/Performance/now Reviewed By: mikearmstrong001 Differential Revision: D2755287 fb-gh-sync-id: 2acada5673633858ae0bbcdcfae554183e36cb24
This commit is contained in:
parent
f43e864ff6
commit
e39657aaae
|
@ -260,8 +260,8 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context)
|
|||
[weakBridge handleBuffer:calls batchEnded:NO];
|
||||
};
|
||||
|
||||
context[@"RCTPerformanceNow"] = ^{
|
||||
return CACurrentMediaTime() * 1000 * 1000;
|
||||
context[@"nativePerformanceNow"] = ^{
|
||||
return @(CACurrentMediaTime() * 1000);
|
||||
};
|
||||
|
||||
#if RCT_DEV
|
||||
|
|
Loading…
Reference in New Issue