Definition at line 28 of file UptimeCommand.cs.
Ntp.Analyzer.Monitor.Server.TextCommand.UptimeCommand.UptimeCommand |
( |
string[] |
args | ) |
|
|
inline |
override string Ntp.Analyzer.Monitor.Server.TextCommand.UptimeCommand.ExecuteTextCommand |
( |
| ) |
|
|
inlineprotectedvirtual |
string Ntp.Analyzer.Monitor.Server.TextCommand.UptimeCommand.FormatTimespan |
( |
TimeSpan |
time | ) |
|
|
inlineprivate |
Definition at line 56 of file UptimeCommand.cs.
60 if (time.TotalDays >= 1 && time.TotalDays < 2)
64 else if (time.TotalDays >= 2)
66 days = time.TotalDays.ToString(CultureInfo.InvariantCulture) +
" days ";
75 if (time.Hours >= 1 && time.Hours < 2)
79 else if (time.Hours >= 2)
81 hours = time.Hours.ToString(CultureInfo.InvariantCulture) +
" hours ";
90 if (time.Minutes >= 1 && time.Minutes < 2)
92 minutes =
"1 minute ";
94 else if (time.Minutes >= 2)
96 minutes = time.Minutes.ToString(CultureInfo.InvariantCulture) +
" minutes ";
100 minutes =
string.Empty;
105 if (time.Seconds >= 1 && time.Seconds < 2)
107 seconds =
"1 second";
109 else if (time.Seconds >= 2)
111 seconds = time.Seconds.ToString(CultureInfo.InvariantCulture) +
" seconds";
115 seconds =
string.Empty;
118 return string.Concat(days, hours, minutes, seconds);
The documentation for this class was generated from the following file: