Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Smartphone development - no milliseconds?

Smartphone development - no milliseconds?

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpannouncementc++asp-netmobile
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Radoslav Bielik
    wrote on last edited by
    #1

    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

    D 1 Reply Last reply
    0
    • R Radoslav Bielik

      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

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      R 1 Reply Last reply
      0
      • D Dave Kreskowiak

        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

        R Offline
        R Offline
        Radoslav Bielik
        wrote on last edited by
        #3

        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

        D 1 Reply Last reply
        0
        • R Radoslav Bielik

          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

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups