Search Results

Search found 3661 results on 147 pages for 'timer jobs'.

Page 2/147 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Please help me decide if I should I change jobs [closed]

    - by KindaNewbie
    About me: I am very entrepreneurial and believe I would do well working solo as a consultant and possibly hiring help. I do want to do that at some point. I love to learn and a good challenge. Please help me make this decision! Current job (I am there for about 4 years): Pros: secure job good pay (I guess I am 80 percentile for my level/geographical area) large corporation - main business is not software excellent health insurance for low cost to me, pension, 401k matching, 6 weeks paid time off per year small dev team use of latest technologies (mostly WPF/silverlight) low supervision (I can do personal things all the time) I get to do a lot of moonlighting and my goal was to go solo full-time in a year or so. Cons: small team of non-professional devs 50% of my time I do things I don't enjoy projects are not meaningful to the organization If I left it wouldn't be too hard for them - business would resume as usual. Nobody besides my small team of 3 has any idea about software development whatsoever. Prospect job: Pros: small/agile software company same salary as current job same size dev team but all are very sharp (I would probably be the weakest of the team in the beginning) technology used is outside my comfort zone (latest cool web technolgies such as html5/jquery/...) - I am not a web dev and they know that. ton of learning opportunity Start-up - possibility of stock option/partial ownership of some sort Cons: Small office space - not able to do personal things as often (may be pro) No room for moonlighting less benefits (but salary can compensate for that)

    Read the article

  • Getting software development Jobs oversees [on hold]

    - by Mario Dennis
    I live in Jamaica and I am currently pursuing a Bsc. in Computer Information Science. I have worked on a few projects and have learn Struts 2, Play Framework, Spring, Mockito, JUnit, Backbone.js etc in my spear time. I have also learn about SOLID and DRY software development as well as architecting software system using Service Oriented Architecture and N-tier Architecture. What I want to know is given all of this can I get a job oversees before completing a degree, how difficult will it be, and what is the best way to go about doing it?

    Read the article

  • Timer application for Windows?

    - by Ashwin
    Can you suggest a good timer application for Windows? It is surprising how useful a timer is for cooking, meditation, and for even giving oneself a timeout while working. I am not interested in any unwanted frills, just a simple light GUI timer that counts down and sounds when done.

    Read the article

  • AJAX - ASP.NET - Timer delay problem

    - by Julian
    Hi, I'm trying to make an webapplication where you see an Ajax countdown timer. Whenever I push a button the countdown should go back to 30 and keep counting down. Now the problem is whenever I push the button the timer keeps counting down for a second or 2 and most of the time after that the timer keeps standing on 30 for to long. WebForm code: <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Label ID="Label1" runat="server" Text="geen verbinding"></asp:Label> <br /> <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" /> <br /> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" /> </Triggers> </asp:UpdatePanel> <asp:Timer ID="Timer1" runat="server" Interval="1000" ontick="Timer1_Tick"> </asp:Timer> </form> Code Behind: static int timer = 30; protected void Page_Load(object sender, EventArgs e) { Label1.Text = timer.ToString(); } protected void Timer1_Tick(object sender, EventArgs e) { timer--; } protected void Button1_Click(object sender, EventArgs e) { timer = 30; } Hope somebody knows what the problem is and if there is anyway to fix this. Thanks in advance!

    Read the article

  • Adding time to a timer/counter

    - by BoneStarr
    I've looked all over the web and everyone can teach you how to make a timer for your game or a countdown, but I can't seem to find out how to add time to an already counting timer. So here is my counter class: package { import flash.display.MovieClip; import flash.display.Stage; import flash.text.TextField; import flash.events.Event; import flash.utils.Timer; import flash.events.TimerEvent; public class Score extends MovieClip { public var second:Number = 0; public var timer:Timer = new Timer(100); private var stageRef:Stage; public function Score(stageRef:Stage) { x = 560.95; y = 31.35; this.stageRef = stageRef; timer.addEventListener(TimerEvent.TIMER, scoreTimer); timer.start(); } public function scoreTimer(evt:TimerEvent):void { second += 1; scoreDisplay.text = String("Score: " +second); } That works without any issues or problems and just keeps counting upwards at a speed of 100ms, what I want to know is how to add say 30 seconds if something happens in my game, say you kill an enemy for example. Please help!

    Read the article

  • Accessing running task scheduled with java.util.Timer

    - by jbatista
    I'm working on a Java project where I have created a class that looks like this (abridged version): public class Daemon { private static Timer[] timerarray=null; private static Daemon instance=null; protected Daemon() { ArrayList<Timer> timers = new ArrayList<Timer>(); Timer t = new Timer("My application"); t.schedule(new Worker(), 10000,30000); timers.add(t); //... timerarray = timers.toArray(new Timer[]{}); } public static Daemon getInstance() { if(instance==null) instance=new Daemon(); return instance; } public SomeClass getSomeValueFromWorker() { return theValue; } ///////////////////////////////////////////// private class Worker extends TimerTask { public Worker() {} public void run() { // do some work } public SomeReturnClass someMethod(SomeType someParameter) { // return something; } } ///////////////////////////////////////////// } I start this class, e.g. by invoking daemon.getInstance();. However, I'd like to have some way to access the running task objects' methods (for example, for monitoring the objects' state). The Java class java.util.Timer does not seem to provide the means to access the running object, it just schedules the object instance extending TimerTask. Are there ways to access the "running" object instanciated within a Timer? Do I have to subclass the Timer class with the appropriate methods to somehow access the instance (this "feels" strange, somehow)? I suppose someone might have done this before ... where can I find examples of this "procedure"? Thank you in advance for your feedback.

    Read the article

  • ASP.NET/AJAX - Timer delay

    - by Julian
    I've got a problem with the timer in asp.net ajax. The timer needs to trigger every second so I put the delay of the timer (don't know the real name atm) at 1000. Now when I put this timer inside an UpdatePanel it doesn't really trigger every second because the timer also gets updated in the UpdatePanel. But when I put the timer outside the update panel it keeps kinda refreshing the page, so whenever I put a button on the same page I need to press and release this button within 1 second else it gets refreshed. Also I saw that even outside of the UpdatePanel the timer isn't a real second. Any solutions?

    Read the article

  • Add a Sleep Timer to Windows 7 Media Center

    - by DigitalGeekery
    Do you make it a habit of falling asleep at night while watching Windows Media Center? Today we are going to take a look at the MC7 Sleep Timer for Windows 7 Media Center. This simple little plugin allows you to schedule an automatic shutdown time in Media Center. Note: At this point MC7 Sleep Timer doesn’t work with extenders. If you’re using ClamAV or Panda it may detect this plugin as a virus, we’ve tested it and this is a false positive for these two antivirus apps. Installation and Usage Download and install MC7 Sleep Timer. (See download below) After the installation is finished, you will find MC7 Sleep Timer located in the Media Center Extras Library. Click on the tile to open the timer and configure your settings. The MC7 Sleep Timer will open in full screen mode. You can choose to shutdown the PC after 30 or 60 minutes, create a custom length shutdown timer at any 5 minute interval, or select the exact time you want the PC to shutdown.  After setting your PC to shutdown, you’ll get an audio confirmation. To set a custom timer length, scroll to the “Custom timer” option and click right or left on your Media Center remote or, the right or left arrow keys, to choose how many minutes before shutdown. To schedule a shutdown for a certain time, browse to the “Shutdown at time” button, and scroll right or left with the arrow keys on the keyboard or remote. When you’ve chosen your time, hit “Enter” on the keyboard or “OK” on the remote.   Clicking the “Monitor Off” button will turn off only the monitor and “Cancel Timer” will cancel your shutdown request. Conclusion If you often find yourself falling asleep every night watching Media Center and then fumbling and stumbling in the middle of the night to shutdown your computer, MC7 Sleep timer might just be a perfect addition to your Media Center setup. Download MC7 Sleep Timer Similar Articles Productive Geek Tips Using Netflix Watchnow in Windows Vista Media Center (Gmedia)Re-Enable Sleep Mode in Windows VistaSchedule Updates for Windows Media CenterIntegrate Hulu Desktop and Windows Media Center in Windows 7Add Color Coding to Windows 7 Media Center Program Guide TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 PCmover Professional Use My TextTools to Edit and Organize Text Discovery Channel LIFE Theme (Win7) Increase the size of Taskbar Previews (Win 7) Scan your PC for nasties with Panda ActiveScan CleanMem – Memory Cleaner AceStock – The Personal Stock Monitor

    Read the article

  • Pause and Resume and get the value of a countdown timer by savedInstanceState [closed]

    - by Catherine grace Balauro
    I have developed a countdown timer and I am not sure how to pause and resume the timer as the TextView for the timer is being clicked. Click to start then click again to pause and to resume, click again the timer's text view. This is my code: Timer = (TextView)this.findViewById(R.id.time); //TIMER Timer.setOnClickListener(TimerClickListener); counter = new MyCount(600000, 1000); }//end of create private OnClickListener TimerClickListener = new OnClickListener() { public void onClick(View v) { updateTimeTask(); } private void updateTimeTask() { if (decision==0){ counter.start(); decision=1;} else if(decision==2){ counter.onResume1(); decision=1; } else{ counter.onPause1(); decision=2; }//end if }; }; class MyCount extends CountDownTimer { public MyCount(long millisInFuture, long countDownInterval) { super(millisInFuture, countDownInterval); }//MyCount public void onResume1(){ onResume(); } public void onPause1() { onPause();} public void onFinish() { Timer.setText("00:00"); p1++; if (p1<=4){ TextView PScore = (TextView) findViewById(R.id.pscore); PScore.setText(p1 + ""); }//end if }//finish public void onTick(long millisUntilFinished) { Integer milisec = new Integer(new Double(millisUntilFinished).intValue()); Integer cd_secs = milisec / 1000; Integer minutes = (cd_secs % 3600) / 60; Integer seconds = (cd_secs % 3600) % 60; Timer.setText(String.format("%02d", minutes) + ":" + String.format("%02d", seconds)); //long timeLeft = millisUntilFinished / 1000; }//on tick }//class MyCount protected void onResume() { super.onResume(); //handler.removeCallbacks(updateTimeTask); //handler.postDelayed(updateTimeTask, 1000); }//onResume @Override protected void onPause() { super.onPause(); //do stuff }//onPause I am only beginner in android programming and I don't know how to get the value of the countdown timer using savedInstanceState. How do I do this?

    Read the article

  • ASP.NET Timer Event

    - by K Ratnajyothi
    protected void SubmitButtonClicked(object sender, EventArgs e) { System.Timers.Timer timer = new System.Timers.Timer(); --- --- //line 1 get_datasource(); String message = "submitted."; ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "popupAlert", "popupAlert(' " + message + " ');", true); timer.Interval = 30000; timer.Elapsed += new ElapsedEventHandler(timer_tick); // Only raise the event the first time Interval elapses. timer.AutoReset = false; timer.Enabled = true; } } protected void timer_tick(object sender, EventArgs e) { //line 2 get_datasource(); GridView2.DataBind(); } The problem is with the data in the grid view that is being displayed... since when get_datasource which is after line 1 is called the updated data is displayed in the grid view since it is a postback event but when the timer event handler is calling the timer_tick event the get_datasource function is called but after that the updated data is not visible in the grid view. It is nnot getting updated since the timer_tick is not a post back event

    Read the article

  • Correct way to do timer function in Python

    - by bwawok
    Hi. I have a GUI application that needs to do something simple in the background (update a wx python progress bar, but that doesn't really matter). I see that there is a threading.timer class.. but there seems to be no way to make it repeat. So if I use the timer, I end up having to make a new thread on every single execution... like : import threading import time def DoTheDew(): print "I did it" t = threading.Timer(1, function=DoTheDew) t.daemon = True t.start() if __name__ == '__main__': t = threading.Timer(1, function=DoTheDew) t.daemon = True t.start() time.sleep(10) This seems like I am making a bunch of threads that do 1 silly thing and die.. why not write it as : import threading import time def DoTheDew(): while True: print "I did it" time.sleep(1) if __name__ == '__main__': t = threading.Thread(target=DoTheDew) t.daemon = True t.start() time.sleep(10) Am I missing some way to make a timer keep doing something? Either of these options seems silly... I am looking for a timer more like a java.util.Timer that can schedule the thread to happen every second... If there isn't a way in Python, which of my above methods is better and why?

    Read the article

  • C# Timer -- measuring time slower

    - by Fassenkugel
    I'm writing a code where: I.) The user adds "events" during run-time. (To a flowlayoutpanel) These events are turning some LEDs on/off, after "x" time has elapsed and the LED-turning functions are written in a Led-function.cs class. i.e: 1) Turn left led on After 3500ms 2) Turn right led on After 4000ms II.) When the user hits start a timer starts. // Create timer. System.Timers.Timer _timer; _timer = new System.Timers.Timer(); _timer.Interval = (1); _timer.Elapsed += (sender, e) => { HandleTimerElapsed(LedObject, device, _timer); }; _timer.Start(); III.) The timer's tick event is raised every millisecond and checks if the user definied time has ellapsed. Im measuring the elapsed time with adding +1 to an integer at every tick event. (NumberOfTicks++;) //Timer Handle private void HandleTimerElapsed(Led_Functions LedObject, string device, System.Timers.Timer _timer) { NumberOfTicks++; if (NumberOfTicks >= Start_time[0]) { LedObject.LeftLED_ONnobutton(device); } } IV.) What I noticed was that when the tick was set to 1. (So the tick event is raised every millisecond) Even if I set 3000ms to the evet the LED actually flashed around 6 seconds. When the tick was set to 100. (So every 0,1s) then the flash was more accurate (3,5sec or so). Any Ideas why im having this delay in time? Or do you have any ideas how could I implement it better? Thank you!

    Read the article

  • C# how to use timer ?

    - by Meko
    Hi. I made a student check_list program thats using bluetooth adapter searches students cell phones bluetooth and checks that are they present or not and saves students informtion with date in table on data base.all them works gereat.But I want to make it automatic that I will put my program on some computer like works as an server and program will make search every lessons start time like 08.30 , 10.25 ... My question is how to use timer? I know how to use timer but How can I use it on every lessons start time?I have table that includes start time of lessons. Also am I have to stop timer after search ends?And If I stop timer could I re-run timer againg? And one additional question that how can I track that new students come or some body left class room?

    Read the article

  • Steve Jobs Proposes New Apple Campus.It’s As Beautiful As An iPad.

    - by Gopinath
    After the launch of iOS 5, OS X Lion and iCloud Steve Jobs proposed Apple’s plans for construction of a new campus in Cupertino. In a presentation to Cupertino City Council, Steve proposed to construct a spaceship style beautiful building that can house 12000 employees. Apple recently purchased 150 acres of land from HP and others in Cupertino and this land will be used for their new campus. The architectural design of the new campus looks awesome just like their products: iPad / iPhone.It’s a four storied circular building with all curved glasses that can accommodate 12000 employees.,  “We do have a shot at building the best office building in the world,” Jobs told the Council members, “Architecture students will come here to see this.”. The facility is going to be eco-friendly with 80% of landscaping with most of the parking going to underground. The current campus has 3700 trees and Apple is planning to increase them to 6000 trees. The campus will be powered with its own renewable energy source and electric grid as backup. Steve described It’s a pretty amazing building. It’s a little like a spaceship landed. It’s got this gorgeous courtyard in the middle… It’s a circle. It’s curved all the way around. If you build things, this is not the cheapest way to build something Check out the embedded video of Steve Jobs at the City Council meeting An Apple Fan boy quickly photoshopped the new campus to something more interesting This article titled,Steve Jobs Proposes New Apple Campus.It’s As Beautiful As An iPad., was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • Change timer intervall in windows service

    - by AyKarsi
    I have timer job inside a windows service, for which the intervall should be incremented when errors occur. My problem is that I can't get the timer.Change Method to actually change the intervall. The "DoSomething" is always called after the inital interval.. This is probably something simple .. Code follows: protected override void OnStart(string[] args) { //job = new CronJob(); timerDelegate = new TimerCallback(DoSomething); seconds = secondsDefault; stateTimer = new Timer(timerDelegate, null, 0, seconds * 1000); } public void DoSomething(object stateObject) { AutoResetEvent autoEvent = (AutoResetEvent)stateObject; if(!Busker.BitCoinData.Helpers.BitCoinHelper.BitCoinsServiceIsUp()) { secondsDefault += secondsIncrementError; if (seconds >= secondesMaximum) seconds = secondesMaximum; Loggy.AddError("BitcoinService not available. Incrementing timer to " + secondsDefault + " s",null); stateTimer.Change(seconds * 100, seconds * 100); return; } else if (seconds > secondsDefault) { // reset the timer interval if the bitcoin service is back up... seconds = secondsDefault; Loggy.Add ("BitcoinService timer increment has been reset to " + secondsDefault + " s"); } // do the the actual processing here }

    Read the article

  • java timer on current instance

    - by hspim
    import java.util.Scanner; import java.util.Timer; import java.util.TimerTask; public class Boggle { Board board; Player player; Timer timer; boolean active; static Scanner in = new Scanner(System.in); public Boggle() { board = new Board(4); timer = new Timer(); } public void newGame() { System.out.println("Please enter your name: "); String line = in.nextLine(); player = new Player(line); active = true; board.shuffle(); System.out.println(board); timer.schedule(new timesUP(), 20000); while(active) { String temp = in.nextLine(); player.addGuess(temp); } } public void endGame() { active = false; int score = Scoring.calculate(player, board); System.out.println(score); } class timesUP extends TimerTask { public void run() { endGame(); } } public static void main(String[] args) { Boggle boggle = new Boggle(); boggle.newGame(); } } I have the above class which should perform a loop for a given length of time and afterwards invoke an instance method. Essentially I need the loop in newGame() to run for a minute or so before endGame() is invoked on the current instance. However, using the Timer class I'm not sure how I would invoke the method I need on the current instance since I can't pass any parameters to the timertasks run method? Is there an easy way to do this or am I going about this the wrong way? (note: this is a console project only, no GUI) ========== code edited I've changed the code to the above following the recommendations, and it works almost as I expect however the thread still doesnt seem to end properly. I was the while loop would die and control would eventually come back to the main method. Any ideas?

    Read the article

  • .NET Windows Service with timer stops responding

    - by Biri
    I have a windows service written in c#. It has a timer inside, which fires some functions on a regular basis. So the skeleton of my service: public partial class ArchiveService : ServiceBase { Timer tickTack; int interval = 10; ... protected override void OnStart(string[] args) { tickTack = new Timer(1000 * interval); tickTack.Elapsed += new ElapsedEventHandler(tickTack_Elapsed); tickTack.Start(); } protected override void OnStop() { tickTack.Stop(); } private void tickTack_Elapsed(object sender, ElapsedEventArgs e) { ... } } It works for some time (like 10-15 days) then it stops. I mean the service shows as running, but it does not do anything. I make some logging and the problem can be the timer, because after the interval it does not call the tickTack_Elapsed function. I was thinking about rewrite it without a timer, using an endless loop, which stops the processing for the amount of time I set up. This is also not an elegant solution and I think it can have some side effects regarding memory. The Timer is used from the System.Timers namespace, the environment is Windows 2003. I used this approach in two different services on different servers, but both is producing this behavior (this is why I thought that it is somehow connected to my code or the framework itself). Does somebody experienced this behavior? What can be wrong? Edit: I edited both services. One got a nice try-catch everywhere and more logging. The second got a timer-recreation on a regular basis. None of them stopped since them, so if this situation remains for another week, I will close this question. Thank you for everyone so far. Edit: I close this question because nothing happened. I mean I made some changes, but those changes are not really relevant in this matter and both services are running without any problem since then. Please mark it as "Closed for not relevant anymore".

    Read the article

  • I need help with a timer for a text based game, i need to include a mysql query to it, but not sure how.

    - by Hijumper
    i would like to add a mysql query somewhere in my timer code so that everytime it restarts then 1 item would be added to the database, i can get it to show how many items you have gotten since the timer has been running, but im not quite sure how to add it into a mysql database, any help would be appreciated :D heres my timer code thus far: <head> <script type="text/javascript"> var c=10; var mineCount = 0; var t; var timer_is_on=0; function timedCount() { document.getElementById('txt').value = c; c = c - 1; if (c <= -1) { mineCount++; var _message = "You have mined " + mineCount + " iron ore" + (((mineCount > 1) ? "s" : "") + "!"); document.getElementById('message').innerHTML = _message; startover(); } } function startover() { c = 10; clearTimeout(t); timer_is_on=0; doMining(); } function doMining() { if (!timer_is_on) { timer_is_on = true; t = setInterval(function () { timedCount(); }, 1000); } } </script> <SPAN STYLE="float:left"> <form> <input type="button" value="Mining" onClick="doMining()"> <input type="text" id="txt"> </form> </SPAN> <html> <center> <div id='message'></div>

    Read the article

  • Game Timer In C++

    - by user1870398
    I need to be able to find out how many milliseconds since that last update. Is there any way I can find it out with time rather then a thread that counts like I did below? #include <iostream> #include<windows.h> #include<time.h> #include<process.h> using namespace std; int Timer = 0; int LastTimer = 0; bool End = false; void Update(int Ticks) { } void UpdateTimer() { while (true) { LastTimer = Timer; Timer++; Sleep(1); if (End) break; } } int WINAPI WinMain(HINSTANCE par1, HINSTANCE par2, LPSTR par3, int par4) { _beginthread(UpdateTimer, 0, NULL); while(true) { if (Timer == 1000) Timer = 0; Update(Timer - LastTimer); } }

    Read the article

  • Problem re-factoring multiple timer countdown

    - by jowan
    I create my multiple timer countdown from easy or simple script. entire code The problem's happen when i want to add timer countdown again i have to declare variable current_total_second CODE: elapsed_seconds= tampilkan("#time1"); and variable timer who set with setInterval.. timer= setInterval(function() { if (elapsed_seconds != 0){ elapsed_seconds = elapsed_seconds - 1; $('#time1').text(get_elapsed_time_string(elapsed_seconds)) }else{ $('#time1').parent().slideUp('slow', function(){ $(this).find('.post').text("Post has been deleted"); }) $('#time1').parent().slideDown('slow'); clearInterval(timer); } }, 1000); i've already know about re-factoring and try different way but i'm stack to re-factoring this code i want implement flexibelity to it.. when i add more of timer countdown.. script do it automatically or dynamically without i have to add a bunch of code.. and the code become clear and more efficient.. Thanks in Advance

    Read the article

  • Showing "Failed" for a SharePoint 2010 Timer Job Status

    - by Damon
    I have been working with a bunch of custom timer jobs for last month.  Basically, I'm processing a bunch of SharePoint items from the timer job and since I don't want the job failing because of an error on one item, so I'm handing errors on an item-by-item basis and just continuing on with the next item.  The net result of this, I soon found, is that my timer job actually says it ran successfully even if every single item fails.  So I figured I would just set the "Failed" status on the timer job is anything went wrong so an administrator could see that not all was well. However, I quickly found that there is no way to set a timer job status.  If you want the status to show up as "Failed" then the only way to do it is to throw an exception.  In my case, I just used a flag to store whether or not an error had occurred, and if so the the timer job throws a an exception just before existing to let the status display correctly.

    Read the article

  • How to create a JQuery Clock / Timer

    - by Ganesh Shankar
    I have a simple quiz application and I want display a nice timer / clock at the top of the page which shows the user how long they've been going for. (If I could somehow show them a timer for Total Quiz Time and also a second one for This Question Time that would be even cooler but I should be able to figure out how to do myself that once I've got one timer working. My question is: What's a nice, easy way to show a simple timer / clock using JQuery? (straight JS is also ok) I know how to check time, but how do I get incrementing seconds? My own searches keep leading me to JQuery plugins (I want to roll my own) and also "event timers" which are not what I'm looking for...

    Read the article

  • Incremental Timer

    - by Donal Rafferty
    I'm currently using a Timer and TimerTask to perform some work every 30 seconds. My problem is that after each time I do this work I want to increment the interval time of the Timer. So for example it starts off with 30 seconds between the timer firing but I want to add 10 seconds to the interval then so that the next time the Timer takes 40 seconds before it fires. Here is my current code: public void StartScanning() { scanTask = new TimerTask() { public void run() { handler.post(new Runnable() { public void run() { wifiManager.startScan(); scanCount++; if(SCAN_INTERVAL_TIME <= SCAN_MAX_INTERVAL){ SCAN_INTERVAL_TIME = SCAN_INTERVAL_TIME + SCAN_INCREASE_INTERVAL; t.schedule(scanTask, 0, SCAN_INTERVAL_TIME); } } }); }}; Log.d("SCAN_INTERVAL_TIME ** ", "SCAN_INTERVAL_TIME ** = " + SCAN_INTERVAL_TIME); t.schedule(scanTask, 0, SCAN_INTERVAL_TIME); } But the above gives the following error: 05-26 11:48:02.472: ERROR/AndroidRuntime(4210): java.lang.IllegalStateException: TimerTask is scheduled already Calling cancel or purge doesn't help. So I was wondering if anyone can help me find a solution? Is a timer even the right way to approach this?

    Read the article

  • WPF Dispatcher timer tick freezes my application

    - by Nebo
    I've got a little problem using WPF Dispatcher Timer. On each timer tick my application freezes for a moment (until timer tick method finishes). This is my code: private DispatcherTimer _Timer = new DispatcherTimer(); _Timer.Tick += new EventHandler(_DoLoop); _Timer.Interval = TimeSpan.FromMilliseconds(1500); _Timer.Start(); Is there any way to avoid this and have my application run smoothly?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >