mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
fix profiler frame time (#4884)
This commit is contained in:
committed by
Weiliang Wang
parent
f03df0bb39
commit
1c3cd4a7d5
@@ -231,6 +231,7 @@ function beforeUpdate () {
|
||||
generateNode();
|
||||
|
||||
const now = cc.director._lastUpdate;
|
||||
getCounter('frame').end(now);
|
||||
getCounter('frame').start(now);
|
||||
getCounter('logic').start(now);
|
||||
}
|
||||
@@ -286,7 +287,6 @@ function afterDraw () {
|
||||
|
||||
const now = performance.now();
|
||||
|
||||
getCounter('frame').end(now);
|
||||
getCounter('fps').frame(now);
|
||||
getCounter('draws').value = device!.numDrawCalls;
|
||||
getCounter('bufferMemory').value = device!.memoryStatus.bufferSize;
|
||||
|
||||
Reference in New Issue
Block a user