Show / Hide Table of Contents

Class PeriodicUpdate

Inheritance
System.Object
PeriodicUpdate
PeriodicUpdateSpatial
Namespace: Eco.Shared.Utils
Assembly: Eco.Shared.dll
Syntax
[Serialized]
public class PeriodicUpdate : Object

Constructors

PeriodicUpdate()

Declaration
public PeriodicUpdate()

PeriodicUpdate(Double, Boolean, Boolean)

Create a timer that will return true to DoUpdate every X seconds. If 'startReady' is false, then it will wait until the time elapses before the first trigger.

Declaration
public PeriodicUpdate(double interval, bool useRealTime = true, bool startReady = true)
Parameters
Type Name Description
System.Double interval
System.Boolean useRealTime
System.Boolean startReady

Fields

GetSimTime

Declaration
public static Func<double> GetSimTime
Field Value
Type Description
System.Func<System.Double>

NextTickTime

Declaration
[Serialized]
public double NextTickTime
Field Value
Type Description
System.Double

Period

Declaration
[Serialized]
public double Period
Field Value
Type Description
System.Double

Properties

DoUpdate

Declaration
public bool DoUpdate { get; }
Property Value
Type Description
System.Boolean

Time

Declaration
public double Time { get; }
Property Value
Type Description
System.Double

TimeTillNext

Declaration
public double TimeTillNext { get; }
Property Value
Type Description
System.Double

Methods

Reset()

Update the next tick time to be 'period' away.

Declaration
public void Reset()

SetToTriggerNextTick()

Declaration
public void SetToTriggerNextTick()

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾