Time and float?

My script calculates the difference between two dates and i get a TimeSpan:

var difference : TimeSpan = currentDate.Subtract(oldDate);

My script products 1 unit in every minute. How can i multiply the units by the time difference?

I hope you can understand me

How about TimeSpan.TotalMinutes

I don’t know if I understood your question correctly but if you want to repeat a certain action every “X” seconds you could use InvokeRepeating which is really easy to use:

function Start() {
    // A unit will be produced every 60 seconds
    // The "0" in the 2nd argument is the delay to start producing. So 0 seconds i.e.    start producing now
    InvokeRepeating("ProduceUnit", 0, 60);
}

function ProduceUnit() {
    // Your unit instantiation code would be here...
}

You can have a look at the docs aswell: