Skip to content

Commit 6a88f6e

Browse files
Merge pull request #616 from zickgraf/master
2 parents f1c53ce + c10795b commit 6a88f6e

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

ToolsForHomalg/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "ToolsForHomalg",
1212
Subtitle := "Special methods and knowledge propagation tools",
13-
Version := "2024.07-01",
13+
Version := "2024.09-01",
1414
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
1515
License := "GPL-2.0-or-later",
1616

ToolsForHomalg/gap/ToolsForHomalg.gd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,11 @@ DeclareGlobalFunction( "StartTimer" );
554554
#! @Arguments name
555555
DeclareGlobalFunction( "StopTimer" );
556556

557+
#! @Description
558+
#! Resets a timer with the given name.
559+
#! @Arguments name
560+
DeclareGlobalFunction( "ResetTimer" );
561+
557562
#! @Description
558563
#! Displays the current value of the timer with the given name.
559564
#! @Arguments name

ToolsForHomalg/gap/ToolsForHomalg.gi

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2685,6 +2685,27 @@ InstallGlobalFunction( StopTimer, function( name )
26852685

26862686
end );
26872687

2688+
##
2689+
InstallGlobalFunction( ResetTimer, function( name )
2690+
2691+
if not IsString( name ) then
2692+
2693+
Error( "<name> must be a string" );
2694+
return;
2695+
2696+
fi;
2697+
2698+
if not IsBound( TOOLS_FOR_HOMALG_INTERNAL_TIMERS.(name) ) then
2699+
2700+
Error( "Timer with name ", name, " was never started." );
2701+
return;
2702+
2703+
fi;
2704+
2705+
Unbind( TOOLS_FOR_HOMALG_INTERNAL_TIMERS.(name) );
2706+
2707+
end );
2708+
26882709
##
26892710
InstallGlobalFunction( DisplayTimer, function( name )
26902711
local current_time, elapsed_time, state, execs;

0 commit comments

Comments
 (0)