Times per unit of time
Tested with Python 2.7, 3.7.
Code to print times per unit of time:
# coding: utf-8
from __future__ import absolute_import
def print_times(times_per_second, multiples):
for multiple in multiples:
_times_per_second = times_per_second * multiple
times_per_minute = _times_per_second * 60
times_per_hour = times_per_minute * 60
times_per_day = times_per_hour * 24
times_per_week = times_per_day * 7
times_per_month = times_per_day * 30
times_per_year = times_per_day * 365
line = '{0:>7,} {1:>11,} {2:>13,} {3:>15,} {4:>16,} {5:>17,} {6:>19,}'\
.format(
_times_per_second,
times_per_minute,
times_per_hour,
times_per_day,
times_per_week,
times_per_month,
times_per_year,
)
print(line)
def main():
header_line = '{0:>7} {1:>11} {2:>13} {3:>15} {4:>16} {5:>17} {6:>19}'\
.format('Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year')
print(header_line)
print_times(times_per_second=1, multiples=range(1, 10))
print(header_line)
print_times(times_per_second=10, multiples=range(1, 10))
print(header_line)
print_times(times_per_second=100, multiples=range(1, 10))
print(header_line)
print_times(times_per_second=1000, multiples=range(1, 10))
print(header_line)
print_times(times_per_second=10000, multiples=range(1, 11))
if __name__ == '__main__':
exit(main())
Times per unit of time:
Second Minute Hour Day Week Month Year
1 60 3,600 86,400 604,800 2,592,000 31,536,000
2 120 7,200 172,800 1,209,600 5,184,000 63,072,000
3 180 10,800 259,200 1,814,400 7,776,000 94,608,000
4 240 14,400 345,600 2,419,200 10,368,000 126,144,000
5 300 18,000 432,000 3,024,000 12,960,000 157,680,000
6 360 21,600 518,400 3,628,800 15,552,000 189,216,000
7 420 25,200 604,800 4,233,600 18,144,000 220,752,000
8 480 28,800 691,200 4,838,400 20,736,000 252,288,000
9 540 32,400 777,600 5,443,200 23,328,000 283,824,000
Second Minute Hour Day Week Month Year
10 600 36,000 864,000 6,048,000 25,920,000 315,360,000
20 1,200 72,000 1,728,000 12,096,000 51,840,000 630,720,000
30 1,800 108,000 2,592,000 18,144,000 77,760,000 946,080,000
40 2,400 144,000 3,456,000 24,192,000 103,680,000 1,261,440,000
50 3,000 180,000 4,320,000 30,240,000 129,600,000 1,576,800,000
60 3,600 216,000 5,184,000 36,288,000 155,520,000 1,892,160,000
70 4,200 252,000 6,048,000 42,336,000 181,440,000 2,207,520,000
80 4,800 288,000 6,912,000 48,384,000 207,360,000 2,522,880,000
90 5,400 324,000 7,776,000 54,432,000 233,280,000 2,838,240,000
Second Minute Hour Day Week Month Year
100 6,000 360,000 8,640,000 60,480,000 259,200,000 3,153,600,000
200 12,000 720,000 17,280,000 120,960,000 518,400,000 6,307,200,000
300 18,000 1,080,000 25,920,000 181,440,000 777,600,000 9,460,800,000
400 24,000 1,440,000 34,560,000 241,920,000 1,036,800,000 12,614,400,000
500 30,000 1,800,000 43,200,000 302,400,000 1,296,000,000 15,768,000,000
600 36,000 2,160,000 51,840,000 362,880,000 1,555,200,000 18,921,600,000
700 42,000 2,520,000 60,480,000 423,360,000 1,814,400,000 22,075,200,000
800 48,000 2,880,000 69,120,000 483,840,000 2,073,600,000 25,228,800,000
900 54,000 3,240,000 77,760,000 544,320,000 2,332,800,000 28,382,400,000
Second Minute Hour Day Week Month Year
1,000 60,000 3,600,000 86,400,000 604,800,000 2,592,000,000 31,536,000,000
2,000 120,000 7,200,000 172,800,000 1,209,600,000 5,184,000,000 63,072,000,000
3,000 180,000 10,800,000 259,200,000 1,814,400,000 7,776,000,000 94,608,000,000
4,000 240,000 14,400,000 345,600,000 2,419,200,000 10,368,000,000 126,144,000,000
5,000 300,000 18,000,000 432,000,000 3,024,000,000 12,960,000,000 157,680,000,000
6,000 360,000 21,600,000 518,400,000 3,628,800,000 15,552,000,000 189,216,000,000
7,000 420,000 25,200,000 604,800,000 4,233,600,000 18,144,000,000 220,752,000,000
8,000 480,000 28,800,000 691,200,000 4,838,400,000 20,736,000,000 252,288,000,000
9,000 540,000 32,400,000 777,600,000 5,443,200,000 23,328,000,000 283,824,000,000
Second Minute Hour Day Week Month Year
10,000 600,000 36,000,000 864,000,000 6,048,000,000 25,920,000,000 315,360,000,000
20,000 1,200,000 72,000,000 1,728,000,000 12,096,000,000 51,840,000,000 630,720,000,000
30,000 1,800,000 108,000,000 2,592,000,000 18,144,000,000 77,760,000,000 946,080,000,000
40,000 2,400,000 144,000,000 3,456,000,000 24,192,000,000 103,680,000,000 1,261,440,000,000
50,000 3,000,000 180,000,000 4,320,000,000 30,240,000,000 129,600,000,000 1,576,800,000,000
60,000 3,600,000 216,000,000 5,184,000,000 36,288,000,000 155,520,000,000 1,892,160,000,000
70,000 4,200,000 252,000,000 6,048,000,000 42,336,000,000 181,440,000,000 2,207,520,000,000
80,000 4,800,000 288,000,000 6,912,000,000 48,384,000,000 207,360,000,000 2,522,880,000,000
90,000 5,400,000 324,000,000 7,776,000,000 54,432,000,000 233,280,000,000 2,838,240,000,000
100,000 6,000,000 360,000,000 8,640,000,000 60,480,000,000 259,200,000,000 3,153,600,000,000
Comments: