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. Java
  4. TIME in java

TIME in java

Scheduled Pinned Locked Moved Java
javahelpquestion
8 Posts 6 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.
  • W Offline
    W Offline
    williamroma
    wrote on last edited by
    #1

    hi for all **(SORRY FOR MY BAD ENGLISH)**first: i thank you all i am always ask you and you always help me really thank you second:i want to make a program in java and after a one minute i want the program to pring anything how can i use the time to make it thank you all

    L T L C 4 Replies Last reply
    0
    • W williamroma

      hi for all **(SORRY FOR MY BAD ENGLISH)**first: i thank you all i am always ask you and you always help me really thank you second:i want to make a program in java and after a one minute i want the program to pring anything how can i use the time to make it thank you all

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Try Google and enter "Java Time" or "Java Elapsed Time" as your search keys. You will then find lots of references to classes and methods that can help you.

      I must get a clever new signature for 2011.

      1 Reply Last reply
      0
      • W williamroma

        hi for all **(SORRY FOR MY BAD ENGLISH)**first: i thank you all i am always ask you and you always help me really thank you second:i want to make a program in java and after a one minute i want the program to pring anything how can i use the time to make it thank you all

        T Offline
        T Offline
        TorstenH
        wrote on last edited by
        #3

        Time flies like an arrow - fruit flies like banana :laugh: Time is measured in "ticks". Refer to the class Date[^] for further information. It is explained very well there. regards Torsten

        I never finish anyth...

        1 Reply Last reply
        0
        • W williamroma

          hi for all **(SORRY FOR MY BAD ENGLISH)**first: i thank you all i am always ask you and you always help me really thank you second:i want to make a program in java and after a one minute i want the program to pring anything how can i use the time to make it thank you all

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          The Java Thread class[^] has a sleep() method which suspends the thread for the specified time span. That could be all you need (it really depends on your requirements, if the app has a GUI, you need either some timer or a separate Thread; if there is no GUI, no activity while waiting at all, then sleep suffices). :)

          Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum

          Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

          S 1 Reply Last reply
          0
          • W williamroma

            hi for all **(SORRY FOR MY BAD ENGLISH)**first: i thank you all i am always ask you and you always help me really thank you second:i want to make a program in java and after a one minute i want the program to pring anything how can i use the time to make it thank you all

            C Offline
            C Offline
            CodingLover
            wrote on last edited by
            #5

            Do you want to print the results repeatedly? If so read more about Threads. Did you tryout anything yet?

            I appreciate your help all the time... CodingLover :)

            W 1 Reply Last reply
            0
            • C CodingLover

              Do you want to print the results repeatedly? If so read more about Threads. Did you tryout anything yet?

              I appreciate your help all the time... CodingLover :)

              W Offline
              W Offline
              williamroma
              wrote on last edited by
              #6

              hi (SORRY FOR MY BAD ENGLISH) i thank you all i have solved the problem realy thank you all now i have some new problems , i try to solve it

              C 1 Reply Last reply
              0
              • W williamroma

                hi (SORRY FOR MY BAD ENGLISH) i thank you all i have solved the problem realy thank you all now i have some new problems , i try to solve it

                C Offline
                C Offline
                CodingLover
                wrote on last edited by
                #7

                Good luck then :)

                I appreciate your help all the time... CodingLover :)

                1 Reply Last reply
                0
                • L Luc Pattyn

                  The Java Thread class[^] has a sleep() method which suspends the thread for the specified time span. That could be all you need (it really depends on your requirements, if the app has a GUI, you need either some timer or a separate Thread; if there is no GUI, no activity while waiting at all, then sleep suffices). :)

                  Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum

                  Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

                  S Offline
                  S Offline
                  shi fj
                  wrote on last edited by
                  #8

                  that's right,Thread. :) from china

                  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