ProtoFlux:UTC Now: Difference between revisions

From Resonite Wiki
m TheAutopilot moved page ProtoFlux:Utc Now to ProtoFlux:UTC Now: Misspelled title: UTC is an abbreviation and should be upper case.
Fixed many links.
 
Line 8: Line 8:
|}}
|}}


Returns the current time in UTC[https://en.wikipedia.org/wiki/Coordinated_Universal_Time].
Returns the current time in [https://en.wikipedia.org/wiki/Coordinated_Universal_Time UTC].


Each evaluation triggers an individual call to DateTime.UtcNow[https://learn.microsoft.com/en-us/dotnet/api/system.datetime.utcnow].
Each evaluation triggers an individual call to [https://learn.microsoft.com/en-us/dotnet/api/system.datetime.utcnow DateTime.UtcNow].
This means that within a single [[Impulses|Impulse]] it can be evaluated with different values.
This means that within a single [[Impulses|Impulse]] it can be evaluated with different values.


Line 16: Line 16:


Since UTC is independent of the local user's timezone it should return approximately the same value on every user.
Since UTC is independent of the local user's timezone it should return approximately the same value on every user.
{{Note|Utc Now is still dependent on the local computer's clock. Differences between users in minutes are somewhat common and in case of incorrectly setup clocks they can reach hours easily. Use [[World Time Float]] or [[World Time Double]] for a more consistent time source.|warning}}
{{Note|Utc Now is still dependent on the local computer's clock. Differences between users in minutes are somewhat common and in case of incorrectly setup clocks they can reach hours easily. Use [[ProtoFlux:World Time Float|World Time Float]] or [[ProtoFlux:World Time Double|World Time Double]] for a more consistent time source.|warning}}


== Outputs ==  
== Outputs ==  

Latest revision as of 03:19, 20 May 2024

Utc Now
*
Time

Returns the current time in UTC.

Each evaluation triggers an individual call to DateTime.UtcNow. This means that within a single Impulse it can be evaluated with different values.

This can be used to measure the runtime of impulse based ProtoFlux to sub-millisecond precision.

Since UTC is independent of the local user's timezone it should return approximately the same value on every user.

Utc Now is still dependent on the local computer's clock. Differences between users in minutes are somewhat common and in case of incorrectly setup clocks they can reach hours easily. Use World Time Float or World Time Double for a more consistent time source.

Outputs

* (DateTime)

The current time in UTC

Examples