Repository: PowerShell/PowerShell
File: src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetUptime.cs (C#)

Code before:
    [OutputType(typeof(DateTime), ParameterSetName = new string[] { SinceParameterSet })]
    public class GetUptimeCommand : PSCmdlet
    {
        /// <summary>
        /// The system startup time.
        /// </summary>
        /// <value></value>
        [Parameter(ParameterSetName = SinceParameterSet)]
        public SwitchParameter Since { get; set; } = new SwitchParameter();

        /// <summary>
        /// This is the main entry point for the cmdlet.
        /// </summary>
        protected override void ProcessRecord()
        {
            // Get-Uptime throw if IsHighResolution = false
            // because stopwatch.GetTimestamp() return DateTime.UtcNow.Ticks
            // instead of ticks from system startup.
            // InternalTestHooks.StopwatchIsNotHighResolution is used as test hook.
            if (Stopwatch.IsHighResolution && !InternalTestHooks.StopwatchIsNotHighResolution)
            {
                TimeSpan uptime = TimeSpan.FromSeconds(Stopwatch.GetTimestamp() / Stopwatch.Frequency);

                if (Since)
                {
                    // Caller requests absolute point in time of last boot
                    WriteObject(DateTime.Now.Subtract(uptime));
                }
                else
                {
                    // Caller requests span of time since last boot
                    WriteObject(uptime);
                }
            }
            else
            {
                WriteDebug("System.Diagnostics.Stopwatch.IsHighResolution returns 'False'.");
                Exception exc = new NotSupportedException(GetUptimeStrings.GetUptimePlatformIsNotSupported);
                ThrowTerminatingError(new ErrorRecord(exc, "GetUptimePlatformIsNotSupported", ErrorCategory.NotImplemented, null));
            }
        }

        /// <summary>
        /// Parameter set name for Timespan OutputType.
        /// </summary>
        private const string TimespanParameterSet = "Timespan";

        /// <summary>
        /// Parameter set name for DateTime OutputType.
        /// </summary>
        private const string SinceParameterSet = "Since";

Review comment (suggestion):
```suggestion
                    // Output the time of the last system boot.
```

Code after:
    [OutputType(typeof(DateTime), ParameterSetName = new string[] { SinceParameterSet })]
    public class GetUptimeCommand : PSCmdlet
    {
        /// <summary>
        /// The system startup time.
        /// </summary>
        /// <value></value>
        [Parameter(ParameterSetName = SinceParameterSet)]
        public SwitchParameter Since { get; set; } = new SwitchParameter();

        /// <summary>
        /// This is the main entry point for the cmdlet.
        /// </summary>
        protected override void ProcessRecord()
        {
            // Get-Uptime throw if IsHighResolution = false
            // because stopwatch.GetTimestamp() return DateTime.UtcNow.Ticks
            // instead of ticks from system startup.
            // InternalTestHooks.StopwatchIsNotHighResolution is used as test hook.
            if (Stopwatch.IsHighResolution && !InternalTestHooks.StopwatchIsNotHighResolution)
            {
                TimeSpan uptime = TimeSpan.FromSeconds(Stopwatch.GetTimestamp() / Stopwatch.Frequency);

                if (Since)
                {
                    // Output the time of the last system boot.
                    WriteObject(DateTime.Now.Subtract(uptime));
                }
                else
                {
                    // Output the time elapsed since the last system boot.
                    WriteObject(uptime);
                }
            }
            else
            {
                WriteDebug("System.Diagnostics.Stopwatch.IsHighResolution returns 'False'.");
                Exception exc = new NotSupportedException(GetUptimeStrings.GetUptimePlatformIsNotSupported);
                ThrowTerminatingError(new ErrorRecord(exc, "GetUptimePlatformIsNotSupported", ErrorCategory.NotImplemented, null));
            }
        }

        /// <summary>
        /// Parameter set name for Timespan OutputType.
        /// </summary>
        private const string TimespanParameterSet = "Timespan";

        /// <summary>
        /// Parameter set name for DateTime OutputType.
        /// </summary>
        private const string SinceParameterSet = "Since";