struct Spectator::Formatting::Components::Runtime

Overview

Presents a human readable time span.

Defined in:

spectator/formatting/components/runtime.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

should(matcher, message = nil) should, should_eventually(matcher, message = nil) should_eventually, should_never(matcher, message = nil) should_never, should_not(matcher, message = nil) should_not

Constructor Detail

def self.new(span : Time::Span) #

Creates the component.


[View source]

Instance Method Detail

def to_s(io) #

Appends the elapsed time to the output. The text will be formatted as follows, depending on the magnitude:

## microseconds
## milliseconds
## seconds
#:##
#:##:##
# days #:##:##

[View source]