@ikanobori/

WellwornSolidRecursion

Python

No description

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.5198062252907054","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IGRhdGV0aW1lCgoKY2xhc3MgU3RvcHdhdGNoOgogIGRlZiBfX2luaXRfXyhzZWxmKToKICAgIHNlbGYuYmVnaW4gPSBOb25lCgogIGRlZiBzdGFydF9tZWFzdXJlbWVudChzZWxmLCBjYXRlZ29yeSk6CiAgICBzZWxmLmJlZ2luID0gZGF0ZXRpbWUuZGF0ZXRpbWUubm93KCkKCiAgZGVmIGZvbyhzZWxmKToKICAgIHByaW50KHNlbGYuYmVnaW4pCgoKc3AgPSBTdG9wd2F0Y2goKQpzcC5zdGFydF9tZWFzdXJlbWVudCgidGVzdCIpCnNwLmZvbygp"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import datetime


class Stopwatch:
  def __init__(self):
    self.begin = None

  def start_measurement(self, category):
    self.begin = datetime.datetime.now()

  def foo(self):
    print(self.begin)


sp = Stopwatch()
sp.start_measurement("test")
sp.foo()