Skip to content

Commit

Permalink
FPS retain one decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
haowenwu committed May 18, 2021
1 parent a32a32e commit e09d724
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions MTHawkeye/Core/MTHawkeyeAverageStorage.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ + (void)setupIfNeeded {
+ (void)record {
[self setupIfNeeded];
if (_fileChar) {
const char *record = [NSString stringWithFormat:@"\357\273\277CPU: %.1f%%\nMemory: %.1fM\nFPS: %d\nglFPS: %d\n",
const char *record = [NSString stringWithFormat:@"\357\273\277CPU: %.1f%%\nMemory: %.1fM\nFPS: %.1f\nglFPS: %.1f\n",
_cpuTotal / MAX(_cpuCount, 1),
_memTotal / MAX(_memCount, 1),
_fpsTotal / MAX(_fpsCount, 1),
_glfpsTotal / MAX(_glfpsCount, 1)
(CGFloat)_fpsTotal / MAX(_fpsCount, 1),
(CGFloat)_glfpsTotal / MAX(_glfpsCount, 1)
].UTF8String;
memcpy((void *)_fileChar, (void *)record, strlen(record));
}
Expand Down
2 changes: 1 addition & 1 deletion MTHawkeyeDemo/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 996e011f38334f4027f5b3a90919d33fc05c4472

COCOAPODS: 1.9.3
COCOAPODS: 1.10.0

0 comments on commit e09d724

Please sign in to comment.