« first day (2486 days earlier)      last day (2679 days later) » 

00:01
ah
bad idea XD
 
4 hours later…
04:00
"Don’t count the days; make the days count." -Mohamad Ali (source)
this is the code for calculating the current download speed and it shows unrealstic speed:
long elasped_time=System.currentTimeMillis()-start_time;
if(elasped_time>0) {
float bps=(bytes_count*1000)/elasped_time;
System.out.println(df.format(bps/1024)+"KBPS");
bytes_count=0;

start_time=System.currentTimeMillis();
}
eg:44310.43KBPS,375960.44KBPS
05:02
@Fawkes it also shows no indentation
 
4 hours later…
09:10
@Fawkes have you tried the same with NanoSeconds?
280
Q: System.currentTimeMillis vs System.nanoTime

mmcdoleAccuracy Vs. Precision What I would like to know is whether I should use System.currentTimeMillis() or System.nanoTime() when updating my object's positions in my game? Their change in movement is directly proportional to the elapsed time since the last call and I want to be as precise as possi...

@Fawkes you first line refers to start_time, when is it initialized? At the end you set it to start_time=System.currentTimeMillis();
yes i had already tried both but then also iam getting abnormal speed
before only
to what value?
System.currentmillis
and then there is while loop]
inside while loop speed one is written
can you paste your code to pasteofcode or pastebin/hastebin?
a bit more than the few lines you have written here
09:20
because if you are getting abnormal high speed, then there is sth wrong with the value in start_time
this while(true) though :D
sorry not able to understand
the "while(true) {}" takes up a lot of resources
think about how often it loops when sth is downloading
do you really have to update the download speed every few micro seconds?
no
every 2-3 seconds
a TimerTask every 500ms or every second would do the job aswell :)
i did with timer also
but then also abnormal speed
something is wrong with the logic
09:28
yes there is a problem with the logic
i created seperate thread for it
but then also nothing happened
explain to me the workflow that you have implemented so that I can get a better understanding in what you are trying to accomplish
10:14
Good morning
 
3 hours later…
12:57
@motaa you still here?
 
2 hours later…
15:18
Why does javafx.scene.paint.Color not have the color "RebeccaPurple"?
 
1 hour later…
 
5 hours later…
21:28
morning

« first day (2486 days earlier)      last day (2679 days later) »