org.mobicents.media.server.impl.clock
Class Semaphore

java.lang.Object
  extended by org.mobicents.media.server.impl.clock.Semaphore

public class Semaphore
extends java.lang.Object

Author:
kulikov

Constructor Summary
Semaphore(org.mobicents.media.server.spi.clock.Timer timer, long precision)
          Creates new instance of semaphore.
 
Method Summary
 void block(long amount)
          Blocks thread for specified amount of time.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Semaphore

public Semaphore(org.mobicents.media.server.spi.clock.Timer timer,
                 long precision)
Creates new instance of semaphore.

Parameters:
timer - timer which will be used for time measurement.
precision - the precision for time measurement in microseconds
Method Detail

block

public void block(long amount)
Blocks thread for specified amount of time.

Parameters:
amount - the amount of time in milliseconds. must be positive.

main

public static void main(java.lang.String[] args)


Copyright © 2010. All Rights Reserved.