STTNet
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Typedefs | Functions
stt::time Namespace Reference

Time-related operations, basic time tools. More...

Classes

struct  Duration
 A structure representing a time interval, supporting granularity in days, hours, minutes, seconds, and milliseconds. More...
 
class  DateTime
 Class for time operations, calculations, and timing. More...
 

Typedefs

using Milliseconds = std::chrono::duration< uint64_t, std::milli >
 
using Seconds = std::chrono::duration< uint64_t >
 

Functions

std::ostream & operator<< (std::ostream &os, const Duration &a)
 Output the Duration object to a stream in a readable format. More...
 

Detailed Description

Time-related operations, basic time tools.

Typedef Documentation

using stt::time::Milliseconds = typedef std::chrono::duration<uint64_t, std::milli>
using stt::time::Seconds = typedef std::chrono::duration<uint64_t>

Function Documentation

std::ostream& stt::time::operator<< ( std::ostream &  os,
const Duration &  a 
)

Output the Duration object to a stream in a readable format.

This function formats the Duration fields (days, hours, minutes, seconds, milliseconds) and outputs them to the given output stream.

Parameters
osThe output stream (e.g., std::cout).
aThe Duration object to output.
Returns
Reference to the output stream for chaining.
Note
The output format is typically human-readable, such as "1d 02:03:04.005" (specific to the implementation).