All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zeroc.IceUtilInternal.StopWatch Maven / Gradle / Ivy

Go to download

Ice is a comprehensive RPC framework that helps you build distributed applications with minimal effort using familiar object-oriented idioms

There is a newer version: 3.7.10
Show newest version
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

package com.zeroc.IceUtilInternal;

public class StopWatch
{
    public void
    start()
    {
        _s = System.nanoTime();
    }

    public long
    stop()
    {
        assert(isStarted());
        long d = (System.nanoTime() - _s) / 1000;
        _s = 0;
        return d;
    }

    public boolean
    isStarted()
    {
        return _s != 0;
    }

    public long
    delay()
    {
        return (System.nanoTime() - _s) / 1000;
    }

    private long _s = 0;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy