An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
602 B

#if PCL || ((!UNITY_EDITOR) && (ENABLE_DOTNET))
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace System.Diagnostics
{
internal class Stopwatch
{
DateTime startTime, stopTime;
public void Start()
{
startTime = DateTime.UtcNow;
}
public void Stop()
{
stopTime = DateTime.UtcNow;
}
public static Stopwatch StartNew()
{
Stopwatch sw = new Stopwatch();
sw.Start();
return sw;
}
public long ElapsedMilliseconds
{
get
{
return (long)((stopTime - startTime).TotalMilliseconds);
}
}
}
}
#endif