Plz help in Timer class

Plz i want the timer class to start but if a packet was recieved from a client before the time is finished the timer is canceled.
//e.g
Datagrampacket rec=new Datagrampacket (byte[],length);
Timer t=new Timer ();
t.schedule(MyTimerTask,1000);
socket.recieve(rec);
// the timer started and the recieving will not start until the timer stopped.
//how to make the recieving happen if the timer is still runnig.
I would be very thankful.

Starting a timer is asynchroneous, so it will not block. The socket will be able to receive data while the timer is running.
/Kaj

Similar Messages

  • I created an iCloud account and also had to get more space after I have done the purchase, I am unable to backup my phone! I have a stable wifi connection at home and all I see for hours and hours is "Backing Up .. Estimating time remaining"!!!!! Plz help

    I created an iCloud account and also had to get more space so after I have made the purchase, I am unable to backup my phone! I have a stable wifi connection at home and all I see for hours and hours is "Backing Up .. Estimating time remaining"!!!!! Plz help I'm unable to make the backup as I need to transfer all my data on my new iPhone 5S

    This may be caused by a corrupt existing backup that needs to be deleted, or by data on your device that is causing the backup to fail.  To troubleshoot these, try deleting your last iCloud backup (if you have one) by turning off iCloud Backup in Settings>iCloud>Storage & Backup, then tap Manage Storage, tap your device under Backups, then tap Delete Backup.  Then go back and turn iCloud Backup back on and try backing up again.
    If it still won't back up, you may have an app or something in your camera roll that is causing the backup to fail.  To locate which one, go to Settings>iCloud>Storage & Backup>Manage Storage, tap the name of your device under Backups, under Backup Options tap Show All Apps, then turn them all to Off (including camera roll) and try backing up again.  If the backup is successful, then the camera roll and/or one of your apps is causing the backup to fail and you'll have to located by process of elimination. Turn the camera roll On and try backing up again.  If it succeeds, turn some of your apps to On and try backing up again.  If it succeeds again, turn some more apps to On then try again; repeat this process until it fails.  Eventually you'll be able to locate the problem app and exclude it from your backup.
    In the meantime you can back up your phone to your computer by connect it, opening iTunes and going to File>Devices>Back Up.  Also be sure to transfer your purchases (File>Devices>Transfer Purchases).  Then set up your new phone and when given the option, choose Restore from iTunes Backup and follow the prompts to restore this backup to your new phone.  This will be much faster than using iCloud anyway.

  • My recirculating pump in sub vi simulation link doesnt work in the second iteration .It opens for maybe half a second whereas i gave the time delay for 5 secs..plz help very urgent

    Hi,
         I have attached my simulation loop.In the model attached i hav eone main pump with constant rpm which drives the 5 smaller pumps and fills the tank at the same time.As soon as the tanks reach their 90% level,the valves of the five pumps close(SP1,SP2,SP3,Sp4,Sp5).After that the recirculating pumps opens for 5 secs of the first tank.As soon as the recirculation finishes,the drain valve(SV1) for tank 1 open and the volume goes to interim storage.This happens for all the remaining tanks.
    My simulation works the first time,but when the second time the loop starts,it skips the recirculation pump even though i gave a time delay for 5 secs.Plz help ..I have attached the simulation.
    Thanks,
    Rami
    Attachments:
    Spatial Logic_2_Final.vi ‏223 KB

    Rami,
    I suspect that you have a race condition. The widespread use of local variables frequently leads to race conditions. Your subVI (Spatial Logic Sub_2.vi was not included) so I cannot run the VI. You have no way of knowing whether the subVI or the inner case structure will execute first, because there is no data dependency between them.
    I think a shift register or a few and some dataflow thinking would allow you to eliminate the inner case structure, the local variables, and, probably, most of your problems.
    Some of the SPi are indicators and some are controls. How are they used?
    The last case of the inner loop retursn to Case 1. Would case 0 be better?
    As for the second time through issue, it may be related to the Elapsed time function Auto Reset. From the help file: "Resets the start time to the value in Present (s) when the Express VI reaches the Time Target (s)." If more than 5 seconds elapses between the first time you use this and the next, it will exit immediately on the subsequent calls.
    Lynn

  • Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Here are a few Links to a helpful Knowledge Base article and a White Paper that should help you out: http://digital.ni.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF and http://www.ni.com/white-paper/10435/en/ . The methods for File IO in Real Time are the same for all of the Real Time Targets. The White Paper has best practices for the File IO and goes over how to do it. 
    Alex D
    Applications Engineer
    National Instruments

  • AddChild function in another Class. plz help!

    Hi,
    I am trying to pull a funtion that adds a child to a container. This function gets pulled in another class. All the traces do work by the child doesn't show.
    pulling the function from StickerBook_Class
    public static var stickBook_Class:StickerBook_Class = new StickerBook_Class  ;
    public var stickBook:stickerBook = new stickerBook  ;
    stickBook_Class.addSticker(stickBook);
    function in StickerBook_Class
    public function addSticker(bg:MovieClip):void
    trace("sticker in album");
    stickBook.addChild(stick1)
    stick1.x = 673
    stick1.y = 80
    any ideas what im doing wrong? the trace deos show by no image is visible.
    plz help me
    Thx
    pavel

    Hi Pavel,
    isn't your method supposed to be similar to below one?
    public function addSticker(sticker:MovieClip):void
         trace("sticker in album");
         stickBook.addChild(sticker);
         sticker.x = 673;
         sticker.y = 80;
    it looks like you want to pass reference to movie clip in your method definition - but within method body you're using variables defined outside of method (so that is hard to other people to see what could be wrong with your code).
    If you are comfortable with your IDE debugging tool just place break-point in e.g. stickBook.addChild(stick) and see what is value of *stick* object during code execution,
    regards,
    Peter

  • I recently deleted imovie 9 .and i don't have a cd and i have not made backup from time machine ..i want it back.plz help me..

    i recently deleted imovie 9 .and i don't have a cd and i have not made backup from time machine ..i want it back.plz help me..

    It depends how you installed it.
    If you installed from your iLife 11 DVD, then you can insert the DVD and install it again.
    If you purchased it from the Mac App Store, you can open the Mac App Store, go to the Purchases tab, and reinstall from there.

  • HT1657 I just rented a movie didn't see it just pressed to see if it starts all good I stopped the movie and now can't find it anywhere to see what happened I supposed to be able to see it during 24hrs as many times as I wish... Plz help to find it on my

    I just rented a movie didn't see it just pressed to see if it starts all good I stopped the movie and now can't find it anywhere to see what happened I supposed to be able to see it during 24hrs as many times as I wish... Plz help to find it on my iPhone.

    I just rented a movie today, and finished it. But now I can't find it. People say that it is in the Purchase, it's not there

  • I have iPhone 4s but not show face time logo on my home screen and my settings.. Plz help me..

    my face time app is not waiting and not show in my iPhone 4s and in settings.. What can I do ... Plz help me

    Do as the image on the screen suggests, connect the device to a computer running iTunes and restore.

  • Hey plz help me out!!  i am using macbook pro 10.5.8..... and was using photobooth...and then after some time i opened it and there was no green light on cam, and it displayed nothing! plz tell me how to fix it! i want to see my face again!!! plz help me

    hey plz help me out!!  i am using macbook pro 10.5.8..... and was using photobooth...and then after some time i opened it and there was no green light on cam, and it displayed nothing! plz tell me how to fix it! i want to see my face again!!! plz help me

    iSight troubleshooting
    http://support.apple.com/kb/HT2090

  • IPhone 4s cannot be restored at this time because the i phone software could not be contacted ios 6.1.2 to 6.1.3 plz help me

    iPhone 4s cannot be restored at this time because the i phone software could not be contacted ios 6.1.2 to 6.1.3 plz help me

    Did you check your security software settings on your computer? iTunes has to be able to contact Apple servers during the update process:
    iTunes for Windows: Troubleshooting security software issues
    If you are trying to update your phone over the air, try to use your computer  and iTunes instead.

  • My app store crashes every time i open it  plz help

    i have upgraded  my iPod touch 4 to ios 6 since it was released and since then every time i open app store it crashes  plz help it *****

    Known problem. See:
    IOS 6 App store crash: Apple Support Communities

  • I have redeemed my iTunes card very time I click to buy a song it's going to a credit card screen. Plz help I am lost

    I have redeemed my iTunes card every time I click to buy a song it goes to a credit card screen. Plz help I've tried everthing

    Hi Evabee!
    Here is an article for you that will help you set up an account without a credit card:
    Creating an iTunes Store, App Store, iBooks Store, and Mac App Store account without a credit card
    http://support.apple.com/kb/ht2534
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

  • Plz help load class files

    hai forum,
    Plz help me out regarding this trouble.
    I have extracted class files of a jar file into a local directory D:\myClass.
    Now i need to access these class files.I loaded the path D:\myClass using URL ClassLoader.
                                  File file = new File("D:myClass");               
                          URL url = file.toURL();         
                          URL[] urls = new URL[]{url};
                          ClassLoader cl = new URLClassLoader(urls);
                          Class c = cl.loadClass(classname);The rest of the code is for listing the methods of the class file.But the class file is not getting loaded and thus the methods are not listed.
    Has it got anything to do with the way i have extracted and stored the class files?
    Plz help me identify my mistake.
    Thank you.

    Hi, I will borrow this thread to discuss my problem with loading a class file.
    How do you use the class when you have loaded it?
    I'm using this code:
    File file = new File("C:\\Foo\\Foo.class");
    URL url = file.toURL();
    URL[] urls = new URL[]url;
    ClassLoader cl = new URLClassLoader(urls);
    Class c = cl.loadClass(cl.getClass().getName());
    Object o = c.newInstance(); <-- This can't be done, my applet just stops and starts to wait or something. I don't get any exception or anything.
    The class Foo.class has a constructor that's prints some text and a function that can print some other text. Is it possible to call that function in some way?

  • Problem posted for the third time! PLZ HELP! Mic not working! :)

    Hey all!
    My Microphone isn't working. Im useing the onboard Live 24-Bit. To this I have at 7.1 Creative Inspire TD7700 with the external decoder, connected. Im useing the Optical cable, if that have anything to do with this.
    When I connect my micrphone, I cant use it at the same time that I play sounds. The difference is when I use the "Digital Output Only" function in the mixer. Here is what it does:
    When DOO is on: I can play and hear all sounds, but my microphone is not working at all.
    When DOO is off: I can record with the micrphone, no problem. I can create and record pretty good wave-files. But I can't hear anything.
    A thin I could do is to turn DOO off, record af wave, turn DOO on, and play the file. -But how cool is that?
    Besides, the primary reason that I got the mic, is that I play alot of World of Warcraft. And I want to use TeamTalk.
    Therefore, isn't there a way to get both things at once, just like "in the good old days"?      Plz help!

    Thana, the mods/admins are on strike...just bump this question if they stop their strike...

  • The iPhone "Nanou" cannot be synced because there is not enough free space to hold all of the items in the iTunes library (additional 3.30 GB required). I have been receiving this msg every time i wanna back up my iPhone 5 to my macbook pro. plz help

    The iPhone “Nanou” cannot be synced because there is not enough free space to hold all of the items in the iTunes library (additional 3.30 GB required). I have been receiving this msg every time i wanna back up my iPhone 5 to my macbook pro. plz help

    I'd like an answer to this one too. I need to backup my iphone5 and am getting the same message. My old laptop is pretty full. Isn't there a way to choose an external hard drive to back up to? If there is, I don't see it.

Maybe you are looking for

  • Agent Determination error in workflow

    Hi all ,   We are working on Travel Management workflow ( 4.6 C ) . We have transported the workflow to our quality server where the workflow is giving error .   The workflow is not able to determine the agent for a task giving an error "no valid age

  • Oracle Application server related issue

    My application is developed using Oracle Developer suite 10g (10.1.2.0.2 ) and deployed in Oracle Application Server 10g R2 (10.1.2.0.2) in windows 2003 32 bit and its working fine. My issue is as follows 1. Since Oracle Application Server 10g R2 (10

  • RRI assgnment details fro query

    Hellow BW Gurus. I'm expierencing the following problem : In my bex query I have 8 fromulas: val1 | val1% |val2 | val2% |val3 | val3% | everage grade| number of candidates. the KF from Infocube is grade value(there is also characteristic  char_val, w

  • I want to run iTunes on a home server, how do I do this?

    My iTunes music files take up too much space/room on my laptop hardrive.  I want to store the music and a separate storage area.  Is that possible?

  • RSA5 active datasource,get this error switch to package ******* is off

    Hi, expert. When I use TCODE RSA5 to active datasource in R3,in the end I got this error: DataSource 0WBS_ELEMT_USR_ATTR; switch to package PS_IS_EHP3_SFWS_SC is off Message no. R8371 my R3 and BW are the same client. I don't know how to correct it.