22 double units,
double& major,
double& minor,
double& minorMinor,
82 if (units < 6 * 3600.0) {
87 if (units < 24 * 3600.0) {
89 major = 7 * 24 * 3600.0;
93 minor = 24.0 * 7.0 * 3600.0;
94 major = 24.0 * 7.0 * 3600.0;
102 units, major, minor, minorMinor, mDigits);
106 wxString& s,
double d,
double,
double minor,
int mDigits,
TickType tickType
110 if (d < 0.0 && (d + minor > 0.0))
119 int secs = (int)(d + 0.5);
121 s.Printf(
wxT(
"%d:%02d:%02d"), secs / 3600, (secs / 60) % 60, secs % 60);
125 t1.Printf(
wxT(
"%d:%02d:"), secs / 3600, (secs / 60) % 60);
126 format.Printf(
wxT(
"%%0%d.%dlf"), mDigits + 3, mDigits);
127 t2.Printf(
format, fmod(d, 60.0));
133 if (minor >= 3600.0) {
134 int hrs = (int)(d / 3600.0 + 0.5);
136 h.Printf(
wxT(
"%d:00:00"), hrs);
139 else if (minor >= 60.0) {
140 int minutes = (int)(d / 60.0 + 0.5);
143 m.Printf(
wxT(
"%d:%02d:00"), minutes / 60, minutes % 60);
145 m.Printf(
wxT(
"%d:00"), minutes);
148 else if (minor >= 1.0) {
149 int secs = (int)(d + 0.5);
152 t.Printf(
wxT(
"%d:%02d:%02d"), secs / 3600, (secs / 60) % 60, secs % 60);
154 t.Printf(
wxT(
"%d:%02d"), secs / 60, secs % 60);
156 t.Printf(
wxT(
"%d"), secs);
166 int secs = (int)(
float)(d);
170 t1.Printf(
wxT(
"%d:%02d:"), secs / 3600, (secs / 60) % 60);
172 t1.Printf(
wxT(
"%d:"), secs / 60);
175 format.Printf(
wxT(
"%%0%d.%dlf"), mDigits + 3, mDigits);
177 format.Printf(
wxT(
"%%%d.%dlf"), mDigits + 3, mDigits);
180 t2.Printf(
format, fmod((
float)d, (float)60.0));
186 double dd = d * 1.000000000000001;
187 int secs = (int)(dd);
191 t1.Printf(
wxT(
"%d:%02d:"), secs / 3600, (secs / 60) % 60);
193 t1.Printf(
wxT(
"%d:"), secs / 60);
196 format.Printf(
wxT(
"%%0%d.%dlf"), mDigits + 3, mDigits);
198 format.Printf(
wxT(
"%%%d.%dlf"), mDigits + 3, mDigits);
200 dd = dd - secs + (secs % 60);
203 double multiplier = pow(10, mDigits);
204 dd = ((int)(dd * multiplier)) / multiplier;