[system] / trunk / webwork2 / lib / WeBWorK / Utils.pm Repository:
ViewVC logotype

Diff of /trunk/webwork2/lib/WeBWorK/Utils.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 667 Revision 692
85} 85}
86 86
87# $ce - a WeBWork::CourseEnvironment object 87# $ce - a WeBWork::CourseEnvironment object
88# $function - fully qualified function name 88# $function - fully qualified function name
89# $details - any information, do not use the characters '[' or ']' 89# $details - any information, do not use the characters '[' or ']'
90# $beginEnd - the string "begin" or "end" 90# $beginEnd - the string "begin", "intermediate", or "end"
91# use the intermediate step begun or completed for INTERMEDIATE
91# use an empty string for $details when calling for END 92# use an empty string for $details when calling for END
92sub writeTimingLogEntry($$$$) { 93sub writeTimingLogEntry($$$$) {
93 my ($ce, $function, $details, $beginEnd) = @_; 94 my ($ce, $function, $details, $beginEnd) = @_;
94 return unless defined $ce->{webworkFiles}->{logs}->{timing}; 95 return unless defined $ce->{webworkFiles}->{logs}->{timing};
95 $beginEnd = ($beginEnd eq "begin") ? ">" : "<"; 96 $beginEnd = ($beginEnd eq "begin") ? ">" : ($beginEnd eq "end") ? "<" : "-";
96 writeLog($ce, "timing", "$$ ".time." $beginEnd $function [$details]"); 97 writeLog($ce, "timing", "$$ ".time." $beginEnd $function [$details]");
97} 98}
98 99
99# ----- 100# -----
100 101

Legend:
Removed from v.667  
changed lines
  Added in v.692

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9