Example usage for javax.sound.midi Sequencer getMicrosecondPosition

List of usage examples for javax.sound.midi Sequencer getMicrosecondPosition

Introduction

In this page you can find the example usage for javax.sound.midi Sequencer getMicrosecondPosition.

Prototype

@Override
long getMicrosecondPosition();

Source Link

Document

Obtains the current position in the sequence, expressed in microseconds.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    Sequencer sequencer = MidiSystem.getSequencer();
    sequencer.open();//from w  w w  . j a v  a  2s . c o m
    double seconds = sequencer.getMicrosecondPosition() / 1000000.0;
}