diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-01-23 12:26:27 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-01-23 12:26:27 +0000 |
commit | 9d59ed4d78747902cd141f743a6aeabd9e531dc8 (patch) | |
tree | 79287b9b317673d97ade5cb0ba9bf8b7c9ee261d /morphlib/stopwatch.py | |
parent | 74b41621814fb02576755aedd87350c833b8228e (diff) | |
download | morph-9d59ed4d78747902cd141f743a6aeabd9e531dc8.tar.gz |
Bump copyright years, get rid of long lines and unused imports.
Diffstat (limited to 'morphlib/stopwatch.py')
-rw-r--r-- | morphlib/stopwatch.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/morphlib/stopwatch.py b/morphlib/stopwatch.py index 7446f897..2554a1c9 100644 --- a/morphlib/stopwatch.py +++ b/morphlib/stopwatch.py @@ -1,4 +1,4 @@ -# Copyright (C) 2011 Codethink Limited +# Copyright (C) 2011-2012 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,8 +15,7 @@ import operator - -from datetime import datetime +import datetime class Stopwatch(object): @@ -28,7 +27,7 @@ class Stopwatch(object): def tick(self, reference_object, name): if not reference_object in self.ticks: self.ticks[reference_object] = {} - self.ticks[reference_object][name] = datetime.now() + self.ticks[reference_object][name] = datetime.datetime.now() def start(self, reference_object): self.tick(reference_object, 'start') |