Skip to content

Instantly share code, notes, and snippets.

@garrynewman
Created June 8, 2018 12:32
Show Gist options
  • Save garrynewman/93c68a38d9d5b46bd9ba2947dc7dbda6 to your computer and use it in GitHub Desktop.
Save garrynewman/93c68a38d9d5b46bd9ba2947dc7dbda6 to your computer and use it in GitHub Desktop.
public struct TimeUntil
{
float time;
public static implicit operator float( TimeUntil ts )
{
return ts.time - Time.time;
}
public static implicit operator TimeUntil( float ts )
{
return new TimeUntil { time = Time.time + ts };
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment