s&
newspaperAbout
infoAbout s&box newspaperLatest News published_with_changesChanges mapRoadmap monitoringMetrics
gamesGames
sports_esportsBrowse Games rocketDiscover Games
business_centerWorkshop
sports_esportsGames landscapeMaps chairModels textureMaterials apparelClothing constructionMore..
forumForum docsDocs
docsDocumentation dashboardApi Reference schoolTutorials
inputLog in with Steam chevron_leftChange Language
简体中文EnglishРусскийEspañolPortuguês-BrasilDeutsch日本語FrançaisPolskiTürkçe한국어PirateItalianoไทย繁體中文УкраїнськаČeštinaNederlandsMagyarDanskSuomiSvenskaNorskΕλληνικάRomânăБългарскиTiếng ViệtBahasa IndonesiaEspañol-Latinoaméricaالعربية
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.
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter