mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
update profile markers for DefaultDebugService
This commit is contained in:
parent
5fac3fd97c
commit
ff6d8cba5a
@ -176,7 +176,11 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
public override void ProfilerMarkBegin(int id)
|
public override void ProfilerMarkBegin(int id)
|
||||||
{
|
{
|
||||||
|
var color = Console.ForegroundColor;
|
||||||
|
Console.ForegroundColor = ConsoleColor.DarkGray;
|
||||||
_stopwatchs[id].Start();
|
_stopwatchs[id].Start();
|
||||||
|
Print("ProfilerMark", $"{_stopwatchsNames[id]} start <");
|
||||||
|
Console.ForegroundColor = color;
|
||||||
}
|
}
|
||||||
public override void ProfilerMarkEnd(int id)
|
public override void ProfilerMarkEnd(int id)
|
||||||
{
|
{
|
||||||
@ -185,7 +189,7 @@ namespace DCFApixels.DragonECS
|
|||||||
_stopwatchs[id].Stop();
|
_stopwatchs[id].Stop();
|
||||||
var time = _stopwatchs[id].Elapsed;
|
var time = _stopwatchs[id].Elapsed;
|
||||||
_stopwatchs[id].Reset();
|
_stopwatchs[id].Reset();
|
||||||
Print("ProfilerMark", _stopwatchsNames[id] + " s:" + time.TotalSeconds);
|
Print("ProfilerMark", $"> {_stopwatchsNames[id]} s:{time.TotalSeconds}");
|
||||||
Console.ForegroundColor = color;
|
Console.ForegroundColor = color;
|
||||||
}
|
}
|
||||||
protected override void OnDelProfilerMark(int id)
|
protected override void OnDelProfilerMark(int id)
|
||||||
|
Loading…
Reference in New Issue
Block a user