i trying run timer execute lambda expression 1.8 seconds in future.
private static timer obruntime = new timer(); public static void main( string[] args ) { obruntime.schedule(() -> { }, 1.8); }
the problem here .schedule can't take in double. there way can cast schedule run 1800 milliseconds or way can take in 1.8 seconds?
timer obruntime = new timer(); obruntime.schedule(new timertask() { @override public void run() { // todo auto-generated method stub system.out.println("will printed after 5 seconds"); } },5000);
Comments
Post a Comment