Click here to Skip to main content
15,888,351 members
Home / Discussions / Mobile
   

Mobile

 
QuestionCall Class Pin
Smaini Nurbs13-Nov-10 1:08
Smaini Nurbs13-Nov-10 1:08 
AnswerRe: Call Class Pin
Smaini Nurbs13-Nov-10 1:09
Smaini Nurbs13-Nov-10 1:09 
GeneralVross post warning!! Pin
Peter_in_278013-Nov-10 9:51
professionalPeter_in_278013-Nov-10 9:51 
QuestionAndriod Development using Eclipse Pin
hussain.attiya7-Nov-10 0:55
hussain.attiya7-Nov-10 0:55 
AnswerRe: Andriod Development using Eclipse Pin
hussain.attiya7-Nov-10 1:12
hussain.attiya7-Nov-10 1:12 
QuestionAndroid Stopwatch *Urgent Help* Pin
Smaini Nurbs5-Nov-10 0:40
Smaini Nurbs5-Nov-10 0:40 
AnswerRe: Android Stopwatch *Urgent Help* Pin
Gerben Jongerius5-Nov-10 2:59
Gerben Jongerius5-Nov-10 2:59 
GeneralRe: Android Stopwatch *Urgent Help* Pin
Smaini Nurbs7-Nov-10 2:41
Smaini Nurbs7-Nov-10 2:41 
Hi, thanks for your help. But I don't know where to start. So this is what I have found so far. Thanks in advance for the help.



package com.novoda.runbuddy.activity;<br />
<br />
public class StopWatch {<br />
<br />
    private long startTime = 0;<br />
    private long stopTime = 0;<br />
    private long elapsed = 0;<br />
    private boolean running = false;<br />
<br />
<br />
    public void start() {<br />
        this.startTime = System.nanoTime();<br />
        this.running = true;<br />
    }<br />
<br />
<br />
    public void stop() {<br />
        this.stopTime = System.nanoTime();<br />
        this.running = false;<br />
    }<br />
<br />
    public void reset() {<br />
        this.startTime = 0;<br />
        this.stopTime = 0;<br />
        this.running = false;<br />
    }<br />
<br />
    //elaspsed time in microseconds<br />
    public long getElapsedTimeMicro() {<br />
        if (running) {<br />
            elapsed = ((System.nanoTime() - startTime) / 1000);<br />
        }<br />
        else {<br />
            elapsed = ((stopTime - startTime) / 1000);<br />
        }<br />
        return elapsed;<br />
    }<br />
<br />
    //elaspsed time in milliseconds<br />
    public long getElapsedTimeMilli() {<br />
        if (running) {<br />
            elapsed = ((System.nanoTime() - startTime) / 1000000);<br />
        }<br />
        else {<br />
            elapsed = ((stopTime - startTime) / 1000000);<br />
        }<br />
        return elapsed;<br />
    }<br />
}

QuestionAndroid Mobile App *Help needed!* Pin
Smaini Nurbs4-Nov-10 16:20
Smaini Nurbs4-Nov-10 16:20 
AnswerRe: Android Mobile App *Help needed!* Pin
Sarvesvara (BVKS) Dasa20-Nov-10 17:04
Sarvesvara (BVKS) Dasa20-Nov-10 17:04 
QuestionGUI design in MIDP 2.0 Pin
trioum2-Nov-10 2:52
trioum2-Nov-10 2:52 
Questionsql server connection Pin
mersad002-Nov-10 1:21
mersad002-Nov-10 1:21 
AnswerRe: sql server connection Pin
Stryder_12-Nov-10 3:23
Stryder_12-Nov-10 3:23 
GeneralRe: sql server connection Pin
RaviRanjanKr14-Nov-10 18:26
professionalRaviRanjanKr14-Nov-10 18:26 
Questionrecording phone Pin
2_Raptor_21-Nov-10 22:34
2_Raptor_21-Nov-10 22:34 
Questionhow to handle key events in Pocket Internet Pin
Rahul Chitte26-Oct-10 22:22
Rahul Chitte26-Oct-10 22:22 
QuestionMobile Web Application Pin
Civic0625-Oct-10 16:24
Civic0625-Oct-10 16:24 
AnswerRe: Mobile Web Application Pin
Amimpat8-Nov-10 21:46
Amimpat8-Nov-10 21:46 
QuestionIphone (Recording Audio) Pin
ShilpiP21-Oct-10 1:16
ShilpiP21-Oct-10 1:16 
Questioncopy iphone4 Pin
vickixwl19-Oct-10 19:59
vickixwl19-Oct-10 19:59 
AnswerRe: copy iphone4 Pin
Richard MacCutchan19-Oct-10 23:30
mveRichard MacCutchan19-Oct-10 23:30 
AnswerRe: copy iphone4 Pin
HimanshuJoshi20-Oct-10 5:56
HimanshuJoshi20-Oct-10 5:56 
QuestionHow accurate are the emulators? Pin
Alexander DiMauro19-Oct-10 15:37
Alexander DiMauro19-Oct-10 15:37 
AnswerRe: How accurate are the emulators? Pin
Peter_in_278019-Oct-10 20:15
professionalPeter_in_278019-Oct-10 20:15 
GeneralRe: How accurate are the emulators? Pin
Magnetomage22-Oct-10 11:47
professionalMagnetomage22-Oct-10 11:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.