Skip to content

Commit

Permalink
fix: Time resolution on the plugin sequence display is actually milli…
Browse files Browse the repository at this point in the history
…seconds (#43)

* fix: Time resolution on the plugin sequence display is actually milliseconds

* docs(changelog): Time resolution on the plugin sequence display is milliseconds, not 0.01 ms
  • Loading branch information
anatawa12 authored Oct 3, 2023
1 parent 0d0a2b4 commit a1534ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Create ApplyOnPlayGlobalActivator correctly when creating and opening scenes (#31)
- Time resolution on the plugin sequence display is milliseconds, not 0.01 ms (#43)

### Changed

Expand Down
6 changes: 3 additions & 3 deletions Editor/API/BuildContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ internal void RunPass(ConcretePass pass)
Stopwatch sw2 = new Stopwatch();
sw2.Start();
DeactivateExtensionContext(ty);
deactivationTimes = deactivationTimes.Add(ty, sw2.ElapsedMilliseconds);
deactivationTimes = deactivationTimes.Add(ty, sw2.Elapsed.TotalMilliseconds);
}

ImmutableDictionary<Type, double> activationTimes = ImmutableDictionary<Type, double>.Empty;
Expand All @@ -261,7 +261,7 @@ internal void RunPass(ConcretePass pass)
Stopwatch sw2 = new Stopwatch();
sw2.Start();
ActivateExtensionContext(ty);
activationTimes = activationTimes.Add(ty, sw2.ElapsedMilliseconds);
activationTimes = activationTimes.Add(ty, sw2.Elapsed.TotalMilliseconds);
}

Stopwatch passTimer = new Stopwatch();
Expand All @@ -283,7 +283,7 @@ internal void RunPass(ConcretePass pass)

BuildEvent.Dispatch(new BuildEvent.PassExecuted(
pass.InstantiatedPass.QualifiedName,
passTimer.ElapsedMilliseconds,
passTimer.Elapsed.TotalMilliseconds,
activationTimes,
deactivationTimes
));
Expand Down

0 comments on commit a1534ca

Please sign in to comment.