Thomas Morris
/
PROJ324_Final
Proj 324 Final
Fork of ELEC351_Group_T by
TIME.hpp@33:3b5096f0126a, 2018-01-07 (annotated)
- Committer:
- chills
- Date:
- Sun Jan 07 00:45:11 2018 +0000
- Revision:
- 33:3b5096f0126a
- Parent:
- 31:4a88bf97b53e
- Child:
- 34:c0b8705f183d
2018_01_07 00:41; Write using in-built time class;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 30:4cde05cc7c4f | 1 | #ifndef _TIME_HPP_ //Known as header guards |
thomasmorris | 30:4cde05cc7c4f | 2 | #define _TIME_HPP_ |
thomasmorris | 30:4cde05cc7c4f | 3 | |
thomasmorris | 30:4cde05cc7c4f | 4 | #include "mbed.h" |
thomasmorris | 30:4cde05cc7c4f | 5 | #include "rtos.h" |
thomasmorris | 31:4a88bf97b53e | 6 | #include <string> |
thomasmorris | 31:4a88bf97b53e | 7 | #include <iostream> |
thomasmorris | 31:4a88bf97b53e | 8 | #include <sstream> |
thomasmorris | 30:4cde05cc7c4f | 9 | |
thomasmorris | 31:4a88bf97b53e | 10 | #define Days_In_Month 30.436875 |
thomasmorris | 31:4a88bf97b53e | 11 | #define second 1 |
thomasmorris | 31:4a88bf97b53e | 12 | #define minute 60 |
thomasmorris | 31:4a88bf97b53e | 13 | #define hour 3600 |
thomasmorris | 31:4a88bf97b53e | 14 | #define day 86400 |
thomasmorris | 31:4a88bf97b53e | 15 | #define week 604800 |
thomasmorris | 31:4a88bf97b53e | 16 | #define month 2629743 |
thomasmorris | 31:4a88bf97b53e | 17 | #define year 31556926 |
thomasmorris | 30:4cde05cc7c4f | 18 | |
thomasmorris | 31:4a88bf97b53e | 19 | int get_current_time(); |
thomasmorris | 31:4a88bf97b53e | 20 | void Add_Second(); |
thomasmorris | 31:4a88bf97b53e | 21 | void Subtract_Second(); |
thomasmorris | 31:4a88bf97b53e | 22 | void Add_Minute(); |
thomasmorris | 31:4a88bf97b53e | 23 | void Subtract_Minute(); |
thomasmorris | 31:4a88bf97b53e | 24 | void Add_Hour(); |
thomasmorris | 31:4a88bf97b53e | 25 | void Subtract_Hour(); |
thomasmorris | 31:4a88bf97b53e | 26 | void Add_Day(); |
thomasmorris | 31:4a88bf97b53e | 27 | void Subtract_Day(); |
thomasmorris | 31:4a88bf97b53e | 28 | void Add_Month(); |
thomasmorris | 31:4a88bf97b53e | 29 | void Subtract_Month(); |
thomasmorris | 31:4a88bf97b53e | 30 | void Add_Year(); |
thomasmorris | 31:4a88bf97b53e | 31 | void Subtract_Year(); |
thomasmorris | 31:4a88bf97b53e | 32 | |
thomasmorris | 30:4cde05cc7c4f | 33 | #endif |