Possibly :-

=(IF(OR(MOD(A1,7)<2,MOD(B1,7)<2),(ROUNDUP(A1,0)-(ROUNDDOWN(B1,0)-"00:00:01")),NETWORKDAYS(ROUNDUP(A1,0),ROUNDDOWN(B1,0)-"00:00:01"))+MOD(B1-A1,1))*24

if either day is a weekend then include weekends, otherwise only include working days

it should be accurate to 1 second