Smartphone development - no milliseconds?
-
Hi everyone, So I thought to myself today that I should try to develop my first Smartphone app, just for fun. I have had an Orange SPV C500 for about 6 months now, and I really missed a stopwatch application (I wanted something simple and easy to use, without all the graphic stuff all other stopwatch apps seems to have). I have downloaded and installed Smartphone 2003 SDK, so now I'm able to target Smartphone 2003 based devices in my Visual Studio 2003. I have created my simple stopwatch application, and quickly ran into the first issue. Once I start the stopwatch, I save the DateTime.Now into a StartTime variable, and then I update the display every 100 milliseconds. To update the display, I calculate TimeSpan ts=DateTime.Now.Subtract(this.StartTime) and then use String.Format to output the value. The issue: The Milliseconds property of TimeSpan is always zero! Does this mean that the .NET Compact Framework doesn't support milliseconds when working with DateTime/TimeSpan? Or am I doing something wrong? When I use the same code in a Windows Forms application, it works fine (including the milliseconds). But the behavior is the same (no milliseconds) in smartphone emulator as well as in the real device (SPV C500). Even the DateTime.Ticks seems to always advance by 1 second. Anyone got any ideas? :( Rado PS: Are there any good communities/forums dedicated to smartphone development? I mean, there is of course the CodeProject for generic C#/C++ development, or www.asp.net for ASP.NET, but I couldn't find anything like that for smartphones.
Radoslav Bielik www.neomyz.com/poll [^] - Get your own web poll www.neomyz.com/rss [^] - RSS Web Reader - latest news for your site www.neomyz.com/games [^] - Add a small game to your website
-
Hi everyone, So I thought to myself today that I should try to develop my first Smartphone app, just for fun. I have had an Orange SPV C500 for about 6 months now, and I really missed a stopwatch application (I wanted something simple and easy to use, without all the graphic stuff all other stopwatch apps seems to have). I have downloaded and installed Smartphone 2003 SDK, so now I'm able to target Smartphone 2003 based devices in my Visual Studio 2003. I have created my simple stopwatch application, and quickly ran into the first issue. Once I start the stopwatch, I save the DateTime.Now into a StartTime variable, and then I update the display every 100 milliseconds. To update the display, I calculate TimeSpan ts=DateTime.Now.Subtract(this.StartTime) and then use String.Format to output the value. The issue: The Milliseconds property of TimeSpan is always zero! Does this mean that the .NET Compact Framework doesn't support milliseconds when working with DateTime/TimeSpan? Or am I doing something wrong? When I use the same code in a Windows Forms application, it works fine (including the milliseconds). But the behavior is the same (no milliseconds) in smartphone emulator as well as in the real device (SPV C500). Even the DateTime.Ticks seems to always advance by 1 second. Anyone got any ideas? :( Rado PS: Are there any good communities/forums dedicated to smartphone development? I mean, there is of course the CodeProject for generic C#/C++ development, or www.asp.net for ASP.NET, but I couldn't find anything like that for smartphones.
Radoslav Bielik www.neomyz.com/poll [^] - Get your own web poll www.neomyz.com/rss [^] - RSS Web Reader - latest news for your site www.neomyz.com/games [^] - Add a small game to your website
It's supported, at least in the documentation it says it is. I would guess that the hardware doesn't support milliseconds when returning the time. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
It's supported, at least in the documentation it says it is. I would guess that the hardware doesn't support milliseconds when returning the time. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Dave Kreskowiak wrote:
It's supported, at least in the documentation it says it is. I would guess that the hardware doesn't support milliseconds when returning the time.
Thank you for your response, I was afraid noone would reply! :) Do you think it isn't supported on the Smartphone 2003 platform as a whole? Or only the specific device (Orange SPV C500)? I started testing on the emulator, which is a part of Smartphone 2003 SDK, and when I noticed I don't get milliseconds, I've tried it on the real device with the same results. Thanks, Rado
Radoslav Bielik www.neomyz.com/poll [^] - Get your own web poll www.neomyz.com/rss [^] - RSS Web Reader - latest news for your site www.neomyz.com/games [^] - Add a small game to your website
-
Dave Kreskowiak wrote:
It's supported, at least in the documentation it says it is. I would guess that the hardware doesn't support milliseconds when returning the time.
Thank you for your response, I was afraid noone would reply! :) Do you think it isn't supported on the Smartphone 2003 platform as a whole? Or only the specific device (Orange SPV C500)? I started testing on the emulator, which is a part of Smartphone 2003 SDK, and when I noticed I don't get milliseconds, I've tried it on the real device with the same results. Thanks, Rado
Radoslav Bielik www.neomyz.com/poll [^] - Get your own web poll www.neomyz.com/rss [^] - RSS Web Reader - latest news for your site www.neomyz.com/games [^] - Add a small game to your website
I have no idea, but if I had to guess, I think it would be the SmartPhone platform that lacks the support for it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome