blob: 33d1169058f729fa34c77f07ff4c2dc45403d127 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
using System;
namespace Zeitgeist.Datamodel
{
/// <summary>
/// The type which deals with Start and End time for an event.
/// </summary>
public struct TimeRange
{
public TimeRange(DateTime startTime, DateTime endTime)
{
_begin = startTime;
_end = endTime;
}
/// <summary>
/// The begin Timestamp of the event. Seconds elapsed since Epoch
/// </summary>
public Int64 Begin
{
get
{
return (Int64)ZsUtils.ToTimestamp(_begin);
}
set
{
_begin = ZsUtils.ToDateTime((ulong)value);
}
}
/// <summary>
/// The end Timestamp of the event. Seconds elapsed since Epoch
/// </summary>
public Int64 End
{
get
{
return (Int64)ZsUtils.ToTimestamp(_end);
}
set
{
_end = ZsUtils.ToDateTime((ulong)value);
}
}
#region Private Fields
private DateTime _begin;
private DateTime _end;
#endregion
}
}
|