At the last possible moment; at the last minute.
In a manner convenient or advantageous at some particular time.
In a manner suitable for some particular purpose.