mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +08:00
use pass by reference in operator* for timespec
This commit is contained in:
parent
17e698ce94
commit
80a087e606
@ -126,7 +126,7 @@ operator- (const struct timespec &a, const struct timespec &b)
|
||||
* that the result is muliple seconds. Only makes sense when the timespec
|
||||
* argument is a duration. */
|
||||
static inline timespec
|
||||
operator* (const struct timespec &ts, const size_t mul)
|
||||
operator* (const struct timespec &ts, const size_t &mul)
|
||||
{
|
||||
struct timespec result = {
|
||||
ts.tv_sec * mul,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user