Package DE_EPAGES::Core::API::Object::ProgressMonitor
This module implements a progress monitor for command line.
Example |
use DE_EPAGES::Core::API::Object::ProgressMonitor; my $Progress = DE_EPAGES::Core::API::Object::ProgressMonitor->new( 'ContentTemplate' => "%4d of %4d products exported.\n", 'Total' => 50, 'Current' => 0, ); for (my $i=1;$i<=50;$i++) { $Progress->set('Current', $i); $Progress->write; } |
Functions
incCurrent
return the current exported element
Syntax |
$Current = $self->incCurrent; |
Return |
|
monitorThread
return the package whos handles threads, used for call startMonitor().
Syntax |
$MonitorThread = $self->monitorThread; |
Return |
|
new
starts the progress monitor for command line requests
Syntax |
$ProgressMonitor = __PACKAGE__->new(%options); |
Input |
|
Return |
|
reset
resets the monitor sets internal Current = 0 and StartTime to now.
Syntax |
$Monitor->reset; |
sharedMonitor
return the shared monitor object, which is triggered if an timeout occurs.
Syntax |
$SharedMonitor = $self->sharedMonitor; |
Return |
|
write
write the monitor content
Syntax |
$ProgressMonitor->write; |