You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
994 B
37 lines
994 B
6 years ago
|
import datetime
|
||
|
import pytextcanvas as pytc
|
||
|
|
||
|
|
||
|
today = datetime.datetime.now()
|
||
|
todayfloat = today.timestamp()
|
||
|
|
||
|
# print(todayfloat)
|
||
|
|
||
|
clicktime = [datetime.datetime(2019, 5, 8, 17, 28, 47, 97080), datetime.datetime(2019, 5, 8, 17, 28, 51, 212919), datetime.datetime(2019, 5, 8, 17, 28, 56, 597356), datetime.datetime(2019, 5, 8, 17, 29, 3, 988067), datetime.datetime(2019, 5, 8, 17, 29, 11, 304892), datetime.datetime(2019, 5, 8, 17, 29, 15, 405272), datetime.datetime(2019, 5, 8, 17, 29, 22, 114432)]
|
||
|
|
||
|
# print(clicktime[1])
|
||
|
|
||
|
diff = clicktime[2] - clicktime[1]
|
||
|
difffloat = clicktime[2].timestamp() - clicktime[1].timestamp()
|
||
|
diffseconds= diff.seconds
|
||
|
diffinhour = diffseconds/3600.0
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
# print(diff)
|
||
|
print(difffloat)
|
||
|
print(diffseconds)
|
||
|
print(diffinhour)
|
||
|
print("\n")
|
||
|
|
||
|
|
||
|
canvas = pytc.Canvas(60, 4)
|
||
|
canvas.fill(".")
|
||
|
# print(canvas)
|
||
|
# canvas.write("PUSH IT TO THE LIMIT")
|
||
|
# print(canvas)
|
||
|
canvas.cursor = (30, 2)
|
||
|
canvas.write("KAAS likes to eat KOOS")
|
||
|
canvas.rectangle('*', 0, 0, 60, 4)
|
||
|
print(canvas)
|