mirror of
https://github.com/CommonLoon102/NBloodServerSupervisor.git
synced 2024-12-23 03:02:51 +01:00
22 lines
550 B
C#
22 lines
550 B
C#
using System;
|
|
using System.Collections.Concurrent;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Model
|
|
{
|
|
public class State
|
|
{
|
|
private TimeSpan playtime = new TimeSpan(0);
|
|
|
|
public ConcurrentDictionary<int, Server> Servers { get; } = new ConcurrentDictionary<int, Server>();
|
|
public DateTime CreatedAtUtc { get; } = DateTime.UtcNow;
|
|
public TimeSpan Playtime => playtime;
|
|
|
|
public void IncreasePlaytime(TimeSpan timeToAdd)
|
|
{
|
|
playtime += timeToAdd;
|
|
}
|
|
}
|
|
}
|