s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News published_with_changesChangesRelease-by-release changelog
Games
Browse Games Discover Games
gamejamslive now

Game Jam III

Ends Fri 25 Sep
ThemeOne More Round

The jam is running. Build something, or play the entries.

£50,000
prizepool
View the jam
Workshop
Playable
sports_esportsGamesStandalone games and gamemodes
Assets
landscapeMaps view_in_arModels textureMaterials apparelClothing
appsEverythingEvery asset type in one list
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
schoolTutorials manage_searchCode Search
inputLog in with Steam
Api
Classes
FastTimer
chevron_left Classes
struct
FastTimer

Properties

data_objectElapseddata_objectElapsedMicroSecondsdata_objectElapsedMilliSecondsdata_objectElapsedSecondsdata_objectElapsedTicksdata_objectStartTick

Methods

functionsStart

Static Methods

functionsStartNew
FastTimer
A lightweight, high-resolution timer for performance measurement. More efficient than System.Diagnostics.Stopwatch with a simpler API.
struct Sandbox.Diagnostics .
sealedSandbox.System

Examples

var timer = FastTimer.StartNew(); // Do work... Log.Info( $"Took {timer.ElapsedMilliSeconds}ms" );

data_object Properties 6

Elapsed
TimeSpan
Gets the time elapsed since the timer was started as a TimeSpan.
ElapsedMicroSeconds
Double
Gets the number of microseconds elapsed since the timer was started.
ElapsedMilliSeconds
Double
Gets the number of milliseconds elapsed since the timer was started.
ElapsedSeconds
Double
Gets the number of seconds elapsed since the timer was started.
ElapsedTicks
long
Gets the number of ticks elapsed since the timer was started.
StartTick
long
Gets the timestamp when the timer was started.

functions Methods 1

Start ()
Starts or restarts the timer.

functions Static Methods 1

StartNew ()
FastTimer
Creates and starts a new FastTimer.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter