Raised This Month: $ Target: $400
 0% 

unixtime + optimizaciones


  
 
 
Thread Tools Display Modes
Author Message
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 06-01-2012 , 19:59   Re: unixtime + optimizaciones
#1

Quote:
Originally Posted by gladius View Post
Code:
int itime, dias, horas, minutos, segundos, milisegundos

itime = floatround(( get_systime( ) - g_vencimiento[ id ] ), floatround_floor); // Supongo que g_vencimiento está en segundos.
dias = itime / 86400;
horas = (itime / 3600) % 24;
minutos = ((itime / 60) - (horas * 60)) % 60;
segundos = (itime - (minutos * 60)) % 60;
//milisegundos = ((time - ((dias * 86400) + (horas * 3600) + (minutos * 60) + segundos)) * 1000);
milisegundos = (time - itime) * 10; // 1 decimal
printf("%02d - %02d:%02d:%02d.%d\n", dias, horas, minutos, segundos, milisegundos);
¿Por qué en c++? xD

Gracias ... pero floatround para que si son números enteros?

Quote:
Originally Posted by Javivi View Post
no veo nada de unixtime ahí o.o
unixtime no es el tiempo que empezó a contar desde el 01/01/1970 ? bueno get_systime te deuvelve ese int. Creo que se llamaba así.
__________________

Last edited by Neeeeeeeeeel.-; 06-01-2012 at 20:00.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode