File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ public class Zone : Object
61
61
private long _passedTickTime ;
62
62
private bool _running ;
63
63
private int _ticks ;
64
+ private int _skippedTicks ;
64
65
private long _physicsTime ;
65
66
private long _objectUpdateTime ;
66
67
private long _scheduleUpdateTime ;
@@ -549,14 +550,20 @@ private Timer SetupTickReporter()
549
550
timer . Elapsed += ( sender , args ) =>
550
551
{
551
552
if ( _ticks > 0 )
553
+ {
552
554
Logger . Debug ( $ "TPS: { _ticks } /{ TicksPerSecondLimit } " +
553
555
$ "TPT: { _passedTickTime / _ticks } ms [{ _physicsTime / _ticks } |" +
554
556
$ "{ _objectUpdateTime / _ticks } |{ _scheduleUpdateTime / _ticks } ]") ;
557
+ }
558
+
559
+ if ( _skippedTicks >= TicksPerSecondLimit / 2 )
560
+ Logger . Warning ( $ "Can't keep up, skipped { _skippedTicks } /{ TicksPerSecondLimit } ticks!") ;
555
561
556
- _scheduleUpdateTime = 0 ;
557
- _objectUpdateTime = 0 ;
558
562
_passedTickTime = 0 ;
563
+ _objectUpdateTime = 0 ;
559
564
_physicsTime = 0 ;
565
+ _scheduleUpdateTime = 0 ;
566
+ _skippedTicks = 0 ;
560
567
_ticks = 0 ;
561
568
} ;
562
569
@@ -574,7 +581,7 @@ private async Task Tick()
574
581
575
582
if ( CalculatingTick )
576
583
{
577
- Logger . Warning ( "Can't keep up! Skipping tick." ) ;
584
+ _skippedTicks ++ ;
578
585
return ;
579
586
}
580
587
You can’t perform that action at this time.
0 commit comments