Skip to content

Commit

Permalink
Merge pull request #616 from zickgraf/master
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-barakat authored Sep 20, 2024
2 parents f1c53ce + c10795b commit 6a88f6e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ToolsForHomalg/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "ToolsForHomalg",
Subtitle := "Special methods and knowledge propagation tools",
Version := "2024.07-01",
Version := "2024.09-01",
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)( ),
License := "GPL-2.0-or-later",

Expand Down
5 changes: 5 additions & 0 deletions ToolsForHomalg/gap/ToolsForHomalg.gd
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,11 @@ DeclareGlobalFunction( "StartTimer" );
#! @Arguments name
DeclareGlobalFunction( "StopTimer" );

#! @Description
#! Resets a timer with the given name.
#! @Arguments name
DeclareGlobalFunction( "ResetTimer" );

#! @Description
#! Displays the current value of the timer with the given name.
#! @Arguments name
Expand Down
21 changes: 21 additions & 0 deletions ToolsForHomalg/gap/ToolsForHomalg.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2685,6 +2685,27 @@ InstallGlobalFunction( StopTimer, function( name )

end );

##
InstallGlobalFunction( ResetTimer, function( name )

if not IsString( name ) then

Error( "<name> must be a string" );
return;

fi;

if not IsBound( TOOLS_FOR_HOMALG_INTERNAL_TIMERS.(name) ) then

Error( "Timer with name ", name, " was never started." );
return;

fi;

Unbind( TOOLS_FOR_HOMALG_INTERNAL_TIMERS.(name) );

end );

##
InstallGlobalFunction( DisplayTimer, function( name )
local current_time, elapsed_time, state, execs;
Expand Down

0 comments on commit 6a88f6e

Please sign in to comment.