blob: 6d59738e17eaa2779422d82f830dc8524e0f4309 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 Christian Pontesegger and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* Christian Pontesegger - initial API and implementation
*******************************************************************************/
package org.eclipse.ease.ui.tools;
public class Timer {
private final long fStart;
public Timer() {
fStart = System.nanoTime();
}
public long getTime() {
return System.nanoTime() - fStart;
}
public long getMilliSeconds() {
return (getTime() + 500000) / 1000000;
}
}