/ld27

To get this branch, use:
bzr branch /bzr/ld27

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-08-25 02:26:02 UTC
  • Revision ID: josh@9ix.org-20130825022602-dryn6uo3ju9pemqg
profiler stubs

Show diffs side-by-side

added added

removed removed

2
2
DEBUG = true
3
3
 
4
4
require 'zoetrope'
 
5
--require 'pepperprof'
5
6
 
6
7
--require 'group'
7
8
 
43
44
 
44
45
              self:switchMaze()
45
46
 
 
47
              -- profiling...
 
48
              --the.profiler = newProfiler()
 
49
              --the.profiler:start()
 
50
 
46
51
              self.gameStart = love.timer.getMicroTime()
47
52
              self.lastChange = love.timer.getMicroTime()
48
53
           end,
133
138
           end,
134
139
   onUpdate = function (self, dt)
135
140
                 if the.keys:justPressed('escape') then
 
141
                    if the.profiler then
 
142
                       the.profiler:stop()
 
143
                       local outfile = io.open( "profile.txt", "w+" )
 
144
                       the.profiler:report( outfile )
 
145
                       outfile:close()
 
146
                    end
 
147
 
136
148
                    self.quit()
137
149
                 end
138
150
              end