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:
Tadeu Zagallo 2015-12-15 14:51:10 -08:00 committed by facebook-github-bot-5
parent f43e864ff6
commit e39657aaae
1 changed files with 2 additions and 2 deletions

View File

@ -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