I’m testing out some code making calls between a calling canister and a receiving canister
Caller - Motoko Playground - DFINITY
Receiver - Motoko Playground - DFINITY
This is the canister API that I’m calling
public shared func callReceiver() : async TimeResult {
let startTimestamp = abs(now());
let receiverActor = getReceiverActor();
let receivedExecutedTimestamp = await receiverActor.call();
let endTimestamp = abs(now());
{
startTimestamp;
receivedExecutedTimestamp;
endTimestamp;
timeToReceiverInMs = (receivedExecutedTimestamp - startTimestamp) / 1_000_000;
roundTripTimeInMs = (endTimestamp - startTimestamp) / 1_000_000;
}
};
And this is the result I’m receiving
(record {
timeToReceiverInMs=0;
roundTripTimeInMs=0;
endTimestamp=1731105528705974575;
startTimestamp=1731105528705974575;
receivedExecutedTimestamp=1731105528705974575
})
Why are all the timestamps the same? I would expect the receiving canister to execute with a different timestamp, and then the final end timestamp to execute later. Like this:
t1- Caller processes ingress message and recordsstartTimestampat timet1t1- Caller initiates call to receiver at timet1t2- Receiver processes inter-canister (same subnet) call from caller at timet2and returnst2asreceivedExecutedTimestampback to the callert3- Caller receives response back from receiver at timet3and recordsendTimestamp