Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _PROGRESS
- #define _PROGRESS
- #include <stdint.h>
- struct Progress {
- uint64_t start, stop;
- uint64_t current;
- Progress(){
- this->start = 0;
- this->stop = 0;
- this->current = 0;
- }
- Progress(uint64_t start, uint64_t stop) {
- this->start = start;
- this->stop = stop;
- this->current = 0;
- };
- double percent() {
- return ((current - start) / (double)(stop - start));
- };
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment