Track startup time in ocarina/__init__.py
The ocarina package can track the startup time better than the launcher script. Tracking it in the package will also make startup time available to other callers.
This commit is contained in:
parent
0c636bfd56
commit
bdd9c331e8
|
@ -1,12 +1,8 @@
|
|||
#!/usr/bin/python2
|
||||
# Bryan Schumaker (8/13/2010)
|
||||
|
||||
import datetime
|
||||
now = datetime.datetime.now
|
||||
before = now()
|
||||
|
||||
import libsaria
|
||||
import ocarina
|
||||
import libsaria
|
||||
from ocarina import window
|
||||
from ocarina import body
|
||||
from ocarina import library
|
||||
|
@ -30,8 +26,7 @@ playlist.init()
|
|||
queue.init()
|
||||
library.init()
|
||||
|
||||
after = now()
|
||||
print "Startup took:", after-before
|
||||
print "Startup took:", ocarina.now() - ocarina.__start__
|
||||
|
||||
ocarina.startup()
|
||||
body.init_page("Library")
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Bryan Schumaker (8/13/2010)
|
||||
|
||||
import datetime
|
||||
now = datetime.datetime.now
|
||||
__start__ = now()
|
||||
|
||||
import gtk
|
||||
import gobject
|
||||
import pango
|
||||
|
@ -19,7 +23,6 @@ if __bug__ > 0:
|
|||
if __dev__ == True:
|
||||
__vers__ += "-dev"
|
||||
|
||||
|
||||
def startup():
|
||||
libsaria.startup()
|
||||
gdk.threads_init()
|
||||
|
|
Loading…
Reference in New Issue