s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
FastTimer
chevron_left
Classes
struct
FastTimer
search
Properties
data_object
Elapsed
data_object
ElapsedMicroSeconds
data_object
ElapsedMilliSeconds
data_object
ElapsedSeconds
data_object
ElapsedTicks
data_object
StartTick
Methods
functions
Start
Static Methods
functions
StartNew
FastTimer
A lightweight, high-resolution timer for performance measurement. More efficient than System.Diagnostics.Stopwatch with a simpler API.
struct
Sandbox.Diagnostics
.
sealed
Sandbox.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.