Definition at line 29 of file Heartbeat.cs.
Ntp.Common.App.Heartbeat.Heartbeat |
( |
LogBase |
log, |
|
|
int |
interval |
|
) |
| |
|
inline |
void Ntp.Common.App.Heartbeat.Pulse |
( |
| ) |
|
|
inlineprivate |
Definition at line 65 of file Heartbeat.cs.
70 var sleep =
start.AddMinutes(next).Subtract(DateTime.Now).TotalMilliseconds;
71 Thread.Sleep(Convert.ToInt32(sleep));
75 var builder =
new StringBuilder();
79 builder.Append(span.Days);
80 builder.Append(
" day");
90 if (span.Hours != 0 && span.Minutes == 0)
92 builder.Append(
" and ");
94 else if (span.Hours == 0 && span.Minutes != 0)
96 builder.Append(
" and ");
98 else if (span.Hours != 0 && span.Minutes != 0)
100 builder.Append(
", ");
106 builder.Append(span.Hours);
107 builder.Append(
" hour");
115 if (span.Hours >= 1 && span.Minutes != 0)
120 if (span.Hours != 0 && span.Minutes != 0)
122 builder.Append(
"and ");
125 if (span.Minutes != 0)
127 builder.Append(span.Minutes);
128 builder.Append(
" minute");
131 if (span.Minutes > 1)
136 log.HeartbeatUptime(builder.ToString());
void Ntp.Common.App.Heartbeat.Start |
( |
| ) |
|
|
inline |
Definition at line 43 of file Heartbeat.cs.
49 var thread =
new Thread(
Pulse)
53 Priority = ThreadPriority.AboveNormal
void Ntp.Common.App.Heartbeat.Stop |
( |
| ) |
|
|
inline |
bool Ntp.Common.App.Heartbeat.alive |
|
private |
int Ntp.Common.App.Heartbeat.beats |
|
private |
readonly int Ntp.Common.App.Heartbeat.interval |
|
private |
readonly LogBase Ntp.Common.App.Heartbeat.log |
|
private |
DateTime Ntp.Common.App.Heartbeat.start |
|
private |
The documentation for this class was generated from the following file: