s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
coming soon
Gamejams
Date
Theme
Date announced very soon. Theme revealed when the jam starts.
$
50,000
prizepool
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
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
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.