GlobalStatsclass

object→GlobalStats
Namespace
global
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.Services.Stats.GlobalStats

Methods5

Showing 5 methods

public Sandbox.Services.Stats.GlobalStats Copy()PUBLIC

Make a copy of this class. Allows you to store the stats from a point in time.

Returns:GlobalStats—

public Sandbox.Services.Stats.GlobalStat Get(string name)PUBLIC

Get a stat by name. Will return an empty stat if not found

ParameterTypeDescription
namestring—
Returns:GlobalStat—

public virtual sealed System.Collections.Generic.IEnumerator`1<Sandbox.Services.Stats.GlobalStat> GetEnumerator()PUBLICVIRTUAL

Returns:IEnumerator<GlobalStat>—

public System.Threading.Tasks.Task Refresh()PUBLIC

Refresh these global stats - grab the latest values

Returns:Task—

public bool TryGet(string name, Sandbox.Services.Stats.GlobalStat stat)PUBLIC

Get a stat by name, returns true if found

ParameterTypeDescription
namestring—
statGlobalStat—
Returns:bool—

Properties3

Showing 3 properties

public bool Sandbox.Services.Stats.GlobalStats.IsRefreshing { get; set; }PUBLICGETSET

True if we're currently fetching new stats

Returns:bool—

public System.DateTime Sandbox.Services.Stats.GlobalStats.LastRefresh { get; set; }PUBLICGETSET

The UTC datetime when we last fetched new stats

Returns:DateTime—

On this page