AceTime
1.9.0
Date and time classes for Arduino that support timezones from the TZ Database.
src
ace_time
TimePeriod.cpp
1
/*
2
* MIT License
3
* Copyright (c) 2018 Brian T. Park
4
*/
5
6
#include <Print.h>
7
#include <AceCommon.h>
8
#include "TimePeriod.h"
9
10
using
ace_common::printPad2To;
11
12
namespace
ace_time {
13
14
void
TimePeriod::printTo
(Print& printer)
const
{
15
if
(
isError
()) {
16
printer.print(F(
"<Error>"
));
17
}
18
19
if
(mSign < 0) {
20
printer.print(
'-'
);
21
}
22
printPad2To(printer, mHour,
'0'
);
23
printer.print(
':'
);
24
printPad2To(printer, mMinute,
'0'
);
25
printer.print(
':'
);
26
printPad2To(printer, mSecond,
'0'
);
27
}
28
29
}
ace_time::TimePeriod::printTo
void printTo(Print &printer) const
Print to given printer.
Definition:
TimePeriod.cpp:14
ace_time::TimePeriod::isError
bool isError() const
Return true if this represents an error.
Definition:
TimePeriod.h:126
Generated by
1.8.17