I need to create a method that will update the petrolpump display in real time, ie adding another litre of petrol a second to the amount dispensed for that session and then calling the method to display the total. But how do I time it correctly? Do I use a thread or is there a better way?
Last edited: