41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using System;
|
|
|
|
namespace BCG
|
|
{
|
|
public class SecondStream : TimeUnitStream
|
|
{
|
|
public SecondStream (DateTime zeroTime, int intervalInSeconds, int sizeOfStream, ViewStreamDatabase db) :
|
|
base (zeroTime, new TimeSpan (0,0,0,intervalInSeconds,0), sizeOfStream, db)
|
|
{}
|
|
|
|
public SecondStream (DateTime zeroTime, int intervalInSeconds, int sizeOfStream) :
|
|
this (zeroTime, intervalInSeconds, sizeOfStream, ViewStreamDatabase.instance)
|
|
{}
|
|
|
|
public SecondStream (int intervalInSeconds, int size)
|
|
: this (DateTime.Now, intervalInSeconds, size)
|
|
{}
|
|
|
|
public SecondStream (DateTime zeroTime, int sizeOfStream, ViewStreamDatabase db) :
|
|
this (zeroTime, 1, sizeOfStream, db)
|
|
{}
|
|
|
|
public SecondStream (DateTime zeroTime, int sizeOfStream) :
|
|
this (zeroTime, 1, sizeOfStream)
|
|
{}
|
|
|
|
public SecondStream (int sizeOfStream) :
|
|
this (DateTime.Now, 1, sizeOfStream)
|
|
{}
|
|
|
|
|
|
|
|
protected override DateTime myRoundTime (DateTime dt)
|
|
{
|
|
//return dt.Subtract (new TimeSpan (0,0,0,0,dt.Millisecond));
|
|
return new DateTime (dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, dt.Second);
|
|
}
|
|
|
|
}
|
|
}
|