mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
* Serialization docs Co-authored-by: Moony <moonheart08@users.noreply.github.com> * ECS docs Co-authored-by: Moony <moonheart08@users.noreply.github.com> * scattered docs Co-authored-by: Moony <moonheart08@users.noreply.github.com> * Fixes --------- Co-authored-by: Moony <moonheart08@users.noreply.github.com> Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
34 lines
712 B
C#
34 lines
712 B
C#
using System;
|
|
|
|
namespace Robust.Shared.Timing
|
|
{
|
|
/// <inheritdoc/>
|
|
public sealed class Stopwatch : IStopwatch
|
|
{
|
|
private readonly System.Diagnostics.Stopwatch _stopwatch;
|
|
|
|
/// <summary>
|
|
/// Constructs a new instance of this object.
|
|
/// </summary>
|
|
public Stopwatch()
|
|
{
|
|
_stopwatch = new System.Diagnostics.Stopwatch();
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public TimeSpan Elapsed => _stopwatch.Elapsed;
|
|
|
|
/// <inheritdoc/>
|
|
public void Start()
|
|
{
|
|
_stopwatch.Start();
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public void Restart()
|
|
{
|
|
_stopwatch.Restart();
|
|
}
|
|
}
|
|
}
|