|
micro-test-plus 6.0.1
µTest++ Testing Framework
|
Deprecated clock reading. More...
#include "micro-os-plus/micro-test-plus.h"
Public Member Functions | |
| timestamp (const timespec &ts) noexcept | |
| Constructs a timestamp with a given time. | |
| timestamp (const timestamp &)=default | |
| Defaulted copy constructor. | |
| timestamp (timestamp &&)=default | |
| Defaulted move constructor. | |
| timestamp (void) noexcept | |
| Constructs a timestamp with the current time. | |
| ~timestamp ()=default | |
| Defaulted destructor. | |
| bool | has_clock (void) const noexcept |
| Checks whether the value is a clock reading. | |
| timestamp & | operator= (const timestamp &)=default |
| Defaulted copy assignment operator. | |
| timestamp & | operator= (timestamp &&)=default |
| Defaulted move assignment operator. | |
| const timespec & | value (void) const noexcept |
| Returns the stored time. | |
| timespec & | value (void) noexcept |
| Returns the stored time, for modification. | |
Protected Attributes | |
| timespec | value_ {} |
| The stored time. | |
The v5.0.1 class of the two readings kept by detail::timestamps, restored for the applications that used it directly; the framework no longer uses it, since stopwatch keeps the readings as timespec members. The timings are internal; use stopwatch instead.
A zero timespec means that the clock was not read, or that the platform has no clock.
The data member is protected, as in v5.0.1, so that the existing derived classes can still access it.
Definition at line 2335 of file deprecated.h.
|
noexcept |
Reads the system clock, as stopwatch::start() does; without a clock, the value remains zero.
Reads the system clock into the stored value, with read_clock(), the same clock as stopwatch; without a clock, the value remains zero.
Definition at line 100 of file deprecated.cpp.
References micro_os_plus::micro_test_plus::detail::read_clock(), and value_.
Referenced by timestamp(), timestamp(), ~timestamp(), operator=(), and operator=().
|
inlinenoexcept |
Not explicit, as in v5.0.1, so that a timespec converts implicitly.
| ts | The time to be stored. |
Copies ts into the stored value.
Definition at line 1297 of file deprecated-inlines.h.
References timestamp(), and value_.
|
default |
A timestamp is a plain value, so it may be copied.
|
default |
Equivalent to the copy, since the value is trivially copyable.
References timestamp().
|
default |
No resources are owned, so there is nothing to release.
References timestamp().
|
inlinenodiscardnoexcept |
The value is not a reading if both its members are zero.
| true | At least one of the members is not zero. |
| false | Both members are zero. |
Returns true if either the seconds or the nanoseconds member is not zero.
Definition at line 1309 of file deprecated-inlines.h.
References has_clock(), and value_.
Referenced by has_clock().
|
default |
A timestamp is a plain value, so it may be assigned.
References timestamp().
Equivalent to the copy assignment, since the value is trivially copyable.
References timestamp().
|
inlinenodiscardnoexcept |
The returned reference is valid as long as the object exists.
Definition at line 1334 of file deprecated-inlines.h.
|
inlinenodiscardnoexcept |
|
protected |
Set by the constructors; zero if the clock was not read.
Definition at line 2448 of file deprecated.h.
Referenced by timestamp(), timestamp(), has_clock(), value(), and value().