File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -130,8 +130,13 @@ function createDebug(namespace) {
130
130
// that float must be the delta time in milliseconds.
131
131
var args = arguments ;
132
132
var beginTime = exports . hrtime ( ) ;
133
+ var ended = false ;
133
134
134
135
var mark = function ( title , extraArgs ) {
136
+ if ( ended ) {
137
+ return ;
138
+ }
139
+
135
140
section . title = title ;
136
141
section . deltaTime = exports . hrtime ( beginTime ) ;
137
142
if ( extraArgs . length ) {
@@ -147,7 +152,11 @@ function createDebug(namespace) {
147
152
var section = {
148
153
title : '[begin]' ,
149
154
end : function ( ) {
150
- return mark ( '[end]' , arguments ) ;
155
+ try {
156
+ return mark ( '[end]' , arguments ) ;
157
+ } finally {
158
+ ended = true ;
159
+ }
151
160
} ,
152
161
mark : function ( ) {
153
162
return mark ( '[mark]' , arguments ) ;
You can’t perform that action at this time.
0 commit comments