mirror of
https://github.com/status-im/react-native.git
synced 2025-02-25 15:45:32 +00:00
Expose RCTPerformanceNow
, microsecond precision time for JavaScript
Summary: public Expose a more precise timer, millisecond precision is enough to measure small operations. Reviewed By: javache Differential Revision: D2604218 fb-gh-sync-id: ba50c891b5690575548fe04ba1ae7d015bc31d90
This commit is contained in:
parent
ccd90e25c1
commit
cb3a07306e
@ -353,6 +353,10 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context)
|
||||
[bridge handleBuffer:calls batchEnded:NO];
|
||||
};
|
||||
|
||||
strongSelf->_context.context[@"RCTPerformanceNow"] = ^(){
|
||||
return CACurrentMediaTime() * 1000 * 1000;
|
||||
};
|
||||
|
||||
#if RCT_DEV
|
||||
if (RCTProfileIsProfiling()) {
|
||||
strongSelf->_context.context[@"__RCTProfileIsProfiling"] = @YES;
|
||||
|
Loading…
x
Reference in New Issue
Block a user