Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User neilf's Avatar
    Join Date
    Mar 2003
    Posts
    12
    Has anyone else noticed that the System.getCurrentTimeMillis() method seems to give completely the wrong time on the 7210 emulator? Kind of annoying when you're trying to seed a random number generator and it keeps giving you the same time! Does anyone know if this happens on the actual phone? Also, is there any way I can report bugs in the emulator? I can't seem to find anywhere on this site.

  2. #2
    Regular Contributor dpolyakov's Avatar
    Join Date
    Mar 2003
    Location
    USA, FL
    Posts
    148
    Nope, it works fine on my computer, but I use a different approach.
    I wrote
    Random m_rnd = new Random();
    and I use m_rnd everywhere I need a random numbers.

    BTW, Neilif, I bought a Nokia 7210 - This phone is a COOL one!!!
    In a week I have to receive a datalink cable, so I'll be able to test on the real device! ))

  3. #3
    Registered User neilf's Avatar
    Join Date
    Mar 2003
    Posts
    12
    Since the Random class is seeded with the current time by default that approach might give me the same sequence of random numbers each time the app was restarted (if System.currentTimeMillis returned the same result each time). Anyway if it's only a problem with my emulator I'm not too worried -- must buy the real phone anyway!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved