1 2 Previous Next 22 Replies Latest reply: Apr 22, 2014 3:33 AM by gimbal2 Go to original post RSS
      • 15. Re: Problem with System.currentTimeMillis()
        gimbal2

        Yeah indeed, I missed the fact that it was HP because it is only ever mentioned for the first time about halfway through the thread. Should I feel shame for assuming it is an Oracle VM? Nah, its just an off-topic question.

        • 16. Re: Problem with System.currentTimeMillis()
          jwenting

          yup. And even if he's found something, his claim of "evidence" by asking the machine for the time when he sees something appearing in a logfile is bonkers.

          • 17. Re: Problem with System.currentTimeMillis()
            user9012483

            I think that you are arrogant and rude.

            Since you're so smart, how would you do it?

            • 18. Re: Problem with System.currentTimeMillis()
              rp0428
              Since you're so smart, how would you do it?

              What is this mysterious 'it' you are referring to?

               

              You still haven't fully responded to what I ask you to do:

              Post code and result data that shows this:

              the function call to System.currentTimeMillis() is a second ahead of the date of the system.

              There was no 'result data' in what you posted at all. And you didn't SHOW us what you did and HOW you did it by posting copies of the session input/output and results. About all you said was this:

              I opened two windows on my server "HP-UX B.11.23 U ia64 2328209431 unlimited-user license".

               

              On the first one I run the comand "tail -f mylogfile.log"

              On the other I am prepared to run the comand "date"

               

              At the moment was traced a new operation I run the commands "date" on the other window.

              I have NO idea what that last line even means. And I can't see any results from it.

               

              Writing buffered data to the file system is NOT a real-time operation. Updating a 'modified' date is NOT a real-time operation. Deleting a file from the file system does NOT necessarily prevent the file from being read from; once a process is reading at the block level it may continue to read those blocks and not even know the file has been deleted since a 'delete' is often just a directory entry to prevent 'future' use of the file.

               

              If you want someone to show you how they would 'do it' you need to provide the actual requirements for 'it'. What actually needs to be done and why does it need to be done; that is, what is the goal?

              • 19. Re: Problem with System.currentTimeMillis()
                baftos

                I understand that that version of Java has a System.currentTimeMillis() that cannot be trusted. Then don't use it! Write your own that calls some native code that uses the system clock. Or talks to a NTP server.

                • 20. Re: Problem with System.currentTimeMillis()
                  rp0428
                  I understand that that version of Java has a System.currentTimeMillis() that cannot be trusted. Then don't use it! Write your own that calls some native code that uses the system clock. Or talks to a NTP server.

                  No thanks. I don't need to write anything. OP is the one with the problem of some sort.

                  • 21. Re: Problem with System.currentTimeMillis()
                    jwenting

                    arrogant and rude? Nah. Just smarter to how the world works than you.

                     

                    How I'd do it? I'd not rely on timestamps to be exactly the same between 2 machines. If you want to uniquely identify message chains or whatever, just use a serial number.

                    • 22. Re: Problem with System.currentTimeMillis()
                      gimbal2

                      jwenting wrote:

                       

                      arrogant and rude? Nah. Just smarter to how the world works than you.

                      Ha ha "I'm smarter than you, get over it and learn from me." I love it.

                      1 2 Previous Next