-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormat.h
More file actions
28 lines (22 loc) · 706 Bytes
/
Copy pathFormat.h
File metadata and controls
28 lines (22 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Author: mikedebo@gmail.com (Michael DiBernardo)
// Copyright Michael DiBernardo 2006
//
// Functions to format data in various ways. Could have used a namespace
// instead of a class, but whatever...
#ifndef __FORMAT_H__
#define __FORMAT_H__
#include <string>
using std::string;
class Format {
public:
// Convert a span of time in milliseconds to a reading such as: 00:01:23.
static string millisecondsToTicker(long ms);
// Convert a span of time in seconds to a reading such as: 00:01:23.
static string secondsToTicker(int s);
// Convert an integer to a string.
static string intToString(int number);
private:
// Don't allow instantiation of this "class".
Format();
};
#endif