#include <xtd/console>
#include <xtd/time_span>
#include <xtd/int64_object>
#include <xtd/string>
void gen_time_span_from_hours(
double hours) {
size_t pIndex = timeInterval.
index_of(
':');
pIndex = timeInterval.
index_of(
'.', pIndex );
if (pIndex < 0) timeInterval += " ";
}
int main( ) {
"generates the following output.\n" );
"from_hours", "time_span" );
"----------", "---------" );
gen_time_span_from_hours( 0.0000002 );
gen_time_span_from_hours( 0.0000003 );
gen_time_span_from_hours( 0.0012345 );
gen_time_span_from_hours( 12.3456789 );
gen_time_span_from_hours( 123456.7898765 );
gen_time_span_from_hours( 0.0002777 );
gen_time_span_from_hours( 0.0166666 );
gen_time_span_from_hours( 1 );
gen_time_span_from_hours( 24 );
gen_time_span_from_hours( 500.3389445 );
}
xtd::size index_of(const basic_string &value) const noexcept
Reports the index of the first occurrence of the specified basic_string in this basic_string.
Definition basic_string.h:1333
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
xtd::string to_string() const noexcept override
Returns a xtd::string that represents the current object.
int32 hours() const noexcept
Gets the hours component of the time interval represented by the current xtd::time_span structure.
Represents a time interval.
Definition time_span.h:29