File: estimate-gcode-time.pl

package info (click to toggle)
slic3r 1.3.0%2Bdfsg1-5.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,552 kB
  • sloc: cpp: 63,126; perl: 21,512; ansic: 6,312; sh: 591; xml: 201; makefile: 37; python: 11
file content (20 lines) | stat: -rwxr-xr-x 397 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env perl

use strict;
use warnings;

BEGIN {
    use FindBin;
    use lib "$FindBin::Bin/../lib", "/usr/lib/slic3r/";
}

use Slic3r;

die "Usage: estimate-gcode-time.pl FILE\n"
    if @ARGV != 1;

my $estimator = Slic3r::GCode::TimeEstimator->new;
$estimator->parse_file($ARGV[0]);
printf "Time: %d minutes and %d seconds\n", int($estimator->time / 60), $estimator->time % 60;

__END__