#!/usr/bin/env ruby require 'optparse' require 'log_simulator' timescale = 1.0 opts = OptionParser.new do |opts| opts.banner = "Usage: simulate [logfile path] [options]" opts.on('-t time',Float,'timescale. Default is 1.0') do |time| timescale = time end opts.on_tail('-h', '--help', 'Show this message') { puts opts; exit } end opts.parse!(ARGV) filepath = ARGV.pop(ARGV.count)[0] if filepath LogSimulator::PlusLogSimulator.start(filepath,timescale) else puts opts.help exit 1 end