protected void doSecondUpdate() {
        try {
            if (this.ship == null || this.state != TrekPlayer.WAIT_PLAYING || hud == null) {
                return;
            }
            // Call the update on the ship.
            ship.doShipSecondUpdate();
            // Count down our messaging timeout.
            messageSendTimeout--;
            if (messageSendTimeout <= 0) {
                messageSendTimeout = 0;
                messageSendCount = 0;
            }
            // Clear messages.
            if (hud.messageWaiting) {
                hud.messageTimeout--;
                if (hud.messageTimeout <= 0) {
                    hud.messageWaiting = false;
                    hud.clearMessage(2);
                }
            }
            if (hud.topMessageWaiting) {
                hud.topMessageTimeout--;
                if (hud.topMessageTimeout <= 0) {
                    hud.topMessageWaiting = false;
                    hud.clearTopMessage();
                }
            }
            if (hud.talkMessageWaiting) {
                hud.talkMessagesTimeout--;
                if (hud.talkMessagesTimeout <= 0) {
                    hud.talkMessageWaiting = false;
                    hud.clearMessages();
                }
            }
            if (hud.damageRcvdWaiting) {
                hud.dmgRvdTimeout--;
                if (hud.dmgRvdTimeout <= 0) {
                    hud.damageRcvdWaiting = false;
                    hud.clearMessage(20);
                    hud.clearMessage(21);
                }
            }
            if (hud.loadMessageWaiting) {
                hud.loadMessageTimeout--;
                if (hud.loadMessageTimeout <= 0) {
                    hud.loadMessageWaiting = false;
                    hud.setLoadMessage("");
                }
            }
        } catch (Exception e) {
            TrekLog.logException(e);
            kill();
        }
    }