Calculates the elapsed build time and returns a prettified output

@private
@param {Array} startTime Array provided by <code>process.hrtime()</code>
@returns {string} Difference between now and the provided time array as formatted string
166500
function getElapsedTime(startTime) {
	const prettyHrtime = require("pretty-hrtime");
	const timeDiff = process.hrtime(startTime);
	return prettyHrtime(timeDiff);
}
604529
def output_start_time(self, start_time_msec):
        '''
        '''
        self.log.write("#[StartTime: %f (seconds since epoch), %s]\n" %
                       (float(start_time_msec) / 1000.0,
                        datetime.fromtimestamp(start_time_msec).iso_format(' ')))
374940
function formatRuntime(raw) {
    var hours, minutes;

    if (!raw) {
        return null;
    }

    hours = raw.match(/(\d+) h/);
    minutes = raw.match(/(\d+) min/);

    hours = hours ? hours[1] : 0;
    minutes = minutes ? +minutes[1] : 0;

    return (hours * 60) + minutes;
}
207892
function getTime(d) {
  if (typeof d !== 'string' || !d) return false;
  d = d.replace(/ /g, '');
  let ptIdx = d.indexOf('.');
  if (ptIdx !== -1) {
    d = d.substr(0, ptIdx);
  }
  let tmp = d.split(':');
  if (tmp.length === 2) tmp.push('00');
  if (tmp.length !== 3) return false;
  let h = parseInt(tmp[0]),
    m = parseInt(tmp[1]),
    s = parseInt(tmp[2]);
  if (isNaN(h) || isNaN(m) || isNaN(s)) return false;
  if (h < 0 || h > 23) return false;
  if (m < 0 || m > 60) return false;
  if (s < 0 || s > 60) return false;
  if (h < 10) h = '0' + h;
  if (m < 10) m = '0' + m;
  if (s < 10) s = '0' + s;
  return {
    sum: parseInt(`${h}${m}${s}`),
    time: `${h}:${m}:${s}`
  };
}
383243
function(started_time) {

		var now = new Date().getTime();
		this._started_time = started_time || now;
		this._end_time = this._started_time + this._duration;

		if (now < this._end_time) {

			this._is_running = true;
			Lava.Cron.acceptTask(this);
			this.onTimer(now);

		} else {

			this.onTimer(this._end_time);

		}

	}
1178835
function timedLog(msg) {
    console.log(Date.now() + ":" + window.performance.now() + ": " + msg);
  }
467273
public static long getDifference(Time timeFrom, Time timeTo) {
		try {
			DateFormat format = new SimpleDateFormat("HH:mm:ss");
			// the a means am/pm marker
			Date date = format.parse(timeFrom.toString());
			Date date2 = format.parse(timeTo.toString());
			long difference = (date2.getTime() - date.getTime()) / 1000 / 60;
			return difference;
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
503511
def clean_start_time(self):
        
        start = self.cleaned_data.get('start_time')
        if not start:
            return start
        active_entries = self.user.timepiece_entries.filter(
            start_time__gte=start, end_time__isnull=True)
        for entry in active_entries:
            output = ('The start time is on or before the current entry: '
                      '%s - %s starting at %s' % (entry.project, entry.activity,
                                                  entry.start_time.strftime('%H:%M:%S')))
            raise forms.ValidationError(output)
        return start
1062685
function getTime(time) {
  var hours = Math.floor(time/3600);
  var minutes = Math.floor(time % 3600/60);
  var seconds = (time % 3600) % 60;

  return hours + 'h ' + minutes + 'min ' + seconds + 's';
}
1306580
public synchronized Instant getStartTime(TimestampProvider times) {
        if (startTime==null) {
            startTime = times.getTime();
        }
        return startTime;
    }
995593
function time( start, end ) {
	var arr;
	var i;

	// Convert start and end times to JavaScript timestamps..
	start = ( new Date( start ) ).getTime();
	end = ( new Date( end ) ).getTime();

	// Add <1 day to ensure end time is included in time vector:
	end += 43200000; // half day [ms]

	// Create a linearly spaced date vector:
	arr = incrdatespace( start, end, 'day' );

	// Convert all date objects to JavaScript timestamps...
	for ( i = 0; i < arr.length; i++ ) {
		arr[ i ] = arr[ i ].getTime();
	}
	return arr;
}
1331391
function hrtime(previousTimestamp){
  var clocktime = performanceNow.call(performance)*1e-3
  var seconds = Math.floor(clocktime)
  var nanoseconds = Math.floor((clocktime%1)*1e9)
  if (previousTimestamp) {
    seconds = seconds - previousTimestamp[0]
    nanoseconds = nanoseconds - previousTimestamp[1]
    if (nanoseconds<0) {
      seconds--
      nanoseconds += 1e9
    }
  }
  return [seconds,nanoseconds]
}
159970
function format(data) {
    const time = util.formatTime(new Date());
    const outputArray = data.toString().replace(/^\s+|\s+$/g, '').split(/\s+/);
    const outputValues = [];
    for (let i = 0, counter = 0; i < outputArray.length; i++) {
        if (!isNaN(outputArray[i])) {
            outputValues[counter] = parseFloat(outputArray[i]);
            counter++;
        }
    }
    if (outputValues.length > 0) {
        return {
            date: time,
            disk: {
                kb_read: outputValues[9],
                kb_wrtn: outputValues[10],
                kb_read_per: outputValues[7],
                kb_wrtn_per: outputValues[8],
                tps: outputValues[6]
            },
            cpu: {
                cpu_user: outputValues[0],
                cpu_nice: outputValues[1],
                cpu_system: outputValues[2],
                cpu_iowait: outputValues[3],
                cpu_steal: outputValues[4],
                cpu_idle: outputValues[5]
            }
        };
    }
    return false;
}
1278250
def elapsed_time(start_time, finish_time)
      duration  = finish_time.to_i - start_time.to_i
      hours     = duration / 3600
      remainder = duration - (hours * 3600)
      minutes   = remainder / 60
      seconds   = remainder - (minutes * 60)
      sprintf "%02d:%02d:%02d", hours, minutes, seconds
    end
153780
def update_progress(cls, progress, starttime):
        
        width, _height = click.get_terminal_size()
        if not width:
            return

        duration = datetime.utcnow() - starttime
        hours, remainder = divmod(duration.seconds, 3600)
        minutes, seconds = divmod(remainder, 60)

        size = int(width * .6)
        status = ""
        if isinstance(progress, int):
            progress = float(progress)
        if not isinstance(progress, float):
            progress = 0
            status = 'error: progress var must be float\n'
            cls.echo(type(progress))
        if progress < 0:
            progress = 0
            status = 'Halt...\n'
        if progress >= 1:
            progress = 1
            # status = 'Done...\n'
        block = int(round(size * progress))
        text = ('\rProgress: [{0}] {1:.2%} {2} {3:0>2}:{4:0>2}:{5:0>2}  '
                ''.format('#' * block + '-' * (size - block), progress,
                          status, hours, minutes, seconds))
        sys.stdout.write(text)
        sys.stdout.flush()
933763
function hrtimer() {
    const start = process.hrtime();

    return () => {
      const durationComponents = process.hrtime(start);
      const seconds = durationComponents[0];
      const nanoseconds = durationComponents[1];
      const duration = (seconds * 1000) + (nanoseconds / 1E6);
      return duration;
    };
  }
142941
function buildToFile(compileOptions, startTime) {
  utils.header()
  utils.log()
  utils.log(emoji.go, 'Building...', chalk.bold.cyan(compileOptions.inputFile))

  return compile(compileOptions).then(result => {
    utils.writeFile(compileOptions.outputFile, result.css)

    const prettyTime = prettyHrtime(process.hrtime(startTime))

    utils.log()
    utils.log(emoji.yes, 'Finished in', chalk.bold.magenta(prettyTime))
    utils.log(emoji.pack, 'Size:', chalk.bold.magenta(bytes(result.css.length)))
    utils.log(emoji.disk, 'Saved to', chalk.bold.cyan(compileOptions.outputFile))
    utils.footer()
  })
}