This commit is contained in:
parent
c50de673d2
commit
40ea0ed7f1
1 changed files with 11 additions and 2 deletions
|
|
@ -2,10 +2,19 @@ using System;
|
||||||
|
|
||||||
namespace DMX2
|
namespace DMX2
|
||||||
{
|
{
|
||||||
public class Info
|
public static class Info
|
||||||
{
|
{
|
||||||
public Info ()
|
static DateTime last = DateTime.MinValue;
|
||||||
|
static string lastinfo = string.Empty;
|
||||||
|
static public void Publish(string info)
|
||||||
{
|
{
|
||||||
|
last = DateTime.Now.AddSeconds(3);
|
||||||
|
lastinfo = info;
|
||||||
|
}
|
||||||
|
static public string GetInfo(){
|
||||||
|
if(DateTime.Now<last)
|
||||||
|
return lastinfo;
|
||||||
|
return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue