I am developing a game in which i want user to collect bonus after every 70 seconds..here is my code to track time but i am unable do get the solution..I am new to Libgdx please help me with this i am scratching my head for past 4 days for this.. :(
long gotime;
long targettime;
float timeleft;
/-------------------In my render function---------/
gotime=(long) Gdx.graphics.getDeltaTime();
gotime=System.currentTimeMillis();
targettime=gotime+70;
if(timeleft>0)
{
timeleft=70 - (gotime - Gdx.graphics.getDeltaTime()) / 1000;//targettime-gotime;
System.out.println("------------"+timeleft);
}