NBloodServerSupervisor/Model/State.cs

22 lines
550 B
C#
Raw Normal View History

2020-01-23 21:03:54 +01:00
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Text;
namespace Model
{
public class State
{
2020-01-27 14:48:53 +01:00
private TimeSpan playtime = new TimeSpan(0);
2020-01-23 21:03:54 +01:00
public ConcurrentDictionary<int, Server> Servers { get; } = new ConcurrentDictionary<int, Server>();
2020-01-27 14:48:53 +01:00
public DateTime CreatedAtUtc { get; } = DateTime.UtcNow;
public TimeSpan Playtime => playtime;
public void IncreasePlaytime(TimeSpan timeToAdd)
{
playtime += timeToAdd;
}
2020-01-23 21:03:54 +01:00
}
}